tvhieuit / nodeJS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

  1. npm init -y
  2. npm i express dotenv cors helmet
  3. npm i -D typescript
  4. npm i -D @types/node @types/express @types/cors @types/helmet
  5. npx tsc --init
  6. npm i -D ts-loader webpack webpack-cli webpack-node-externals
  7. npm i -s @overnightjs/core @overnightjs/logger
  8. npm i -D @types/node @types/express
  9. npm install -s @types/body-parser @types/cors @types/helmet
  10. npm install reflect-metadata --save

create index.js file create webpack.config.ts

  1. npm run webpack
  2. npm start

#Secure https://auth0.com/blog/use-typescript-to-create-a-secure-api-with-nodejs-and-express-getting-started/ https://stackabuse.com/authentication-and-authorization-with-jwts-in-express-js/

About


Languages

Language:TypeScript 100.0%