@mishrayush/medium-common-cohort
v1.0.0
Published
ZOD INFERENCE PACKAGE
Readme
IMPORTANT BITS
As we know that the zod infer we did is basically something that we will eventually need in both "Backend" & "Frontend" as to make sure the Backend accepts the right set of data and also to make sure that the Frontend sends the right set of data, that's why we can't keep/store the zod stuff inside the backend as the bacend folder will be deployed deomwhere else and the frontend folder wil be deployed somewhere else. Hence to fix this and to make sure that the ZOD inference is used by both Fron-End as well as the Back-End we will initialize that in a seperate folder names "COMMON", -- refer zod inference & npm deploy video --
https://projects.100xdevs.com/tracks/blog/blog-10
STEPS
- Create a 'common' folder
- Initialise npm
- Initialise Typescript
- Change -> rootDir -> ./src
- Change -> outDir -> ./dist
- Change -> declaration : true (to make sure both JS and TS gets uploaded while deploying it to NPM)
- Create the code required by both Frontend and Backend
