using MERN stack
Tour planner website with API(https://documenter.getpostman.com/view/31106866/2s9YymJR44).
JWT_EXPIRES_IN 90 DAYS
- express version 4
- nodemon
- morgan --> 3rd party middleware
- dotenv --> for environment variables
- eslint prettier eslint-config-prettier eslint-plugin-prettier eslint-config-airbnb eslint-plugin-node eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react
- Slugify
- Validator
- NDB --> ndoe debugger in chromium -- npm run debug
- bcrpyt --> encryption of password
- jsonwebtoken --> to create JWT for authentication
- nodemailer --> send email thorugh node
- express-rate-limit --> for implementing rate limiting (API limiting).
- express-mongo-sanitize --> Data sanitization
- hpp --> for preventing parameter pollution
- xss-clean --> data sanitization against XSS
- pug --> express template engine for rendering pages
- axios --> fetching API
- cookie-parser --> parse cookie in browser
- @babel/ployfill
- parcel-bundler --> making file bundles
- multer --> uploading files
- sharp --> to resize the images
- npm init for package.json
- npm i express@4
- app.js be default express code is written in app.js convention
- npm i nodemon
- package.json --> "scripts" { "start": "nodemon app.js"}
- __dirname --> locate current folder (daptours)
- fs.readFileSync() --> method, we can read files in a synchronous way
- node ./dev-data/data/import-dev-data.js --delete --> to delete existing demo data
- node ./dev-data/data/import-dev-data.js --import --> to import new json file data
ADVANCE postman setup -> Setting UP environment in postman
- Two environments - Dev: Daptours Prod: Daptours
- setting variable - URL : http://127.0.0.1:3000/ current variable to - http://127.0.0.1:3000/
- TESTS in requests - pm.environment.set("jwt", pm.response.json().token); to save JSONwebToekn in environment.
- Authorization in GET allTours - Bearer Token > {{jwt}}
EMAIL Testing with https://mailtrap.io
Sends Dummy mails to check the functionality of modemailer and resetToken.
Sending email nodemailer.
package.json -- "watch:js": "parcel watch ./public/js/index.js --out-dir ./public/js --out-file bundle.js", "build:js": "parcel watch ./public/js/index.js --out-dir ./public/js --out-file bundle.js" terminal -- npm run watch:js 1. to create bundle of files 2.