@ashwin-ma/common
v1.0.12
Published
This is a Node Module Package. This is used in: https://github.com/ashwin-magalu/MERN-microservices-advanced
Downloads
30
Readme
common-npm-package
This is a Node Module Package. This is used in: https://github.com/ashwin-magalu/MERN-microservices-advanced
Workflow
- Open https://npmjs.com website
- Create an account
- Click on your Image > select Add Organization
- Add organization name and click on create button
- Go to root directory and create a new folder named "common" and change terminal directory to "common"
- Run: npm init -y
- Change name inside the package.json file to "@/common"
- Run commands:
- git init
- git add .
- git commit -m "initial commit"
- Run: npm login
- Run: npm publish --access public
- Run: tsc --init
- Run: npm i typescript del-cli --save-dev
- Edit tsconfig.json file and package.json file
- Create index.js file inside src folder
- Run: npm run build --> This will create build folder
- Run commands:
- git add .
- git commit -m "second commit"
- npm version patch --> To update the version number
- npm run build
- npm publish
- Don't use pub script which is inside package.json in real applications
- Move errors and middlewares folders from auth folder to common folder
- Stop Skaffold
- Run: npm i express-validator jsonwebtoken express cookie-session @types/cookie-session @types/express @types/jsonwebtoken
- Run: tsc
- Run: npm run pub
- Run: npm i @ashwin-ma/common --> In auth folder
- Rewrite errors and middlwares imports in auth folder
- Re-run skaffold to test is everything is working