Skip to content

Node.js Express demo project for restful web api server

Notifications You must be signed in to change notification settings

timc986/nodejs-webapi-demo

Repository files navigation

nodejs-webapi-demo

A demo project for Node.js Express web api server

Tech

  • Built with Node.js version 14.15.0 and Express version 4.17.1
  • TypeORM version 0.2.31 for database connection and object-relational mapping
  • Pg version 8.5.1 for PostgreSQL
  • Express-validator version 6.10.0 for api request validation
  • Dotenv version 8.2.0 for loading different environment variables into the config
  • Typescript version 4.1.5
  • Update database schema with TypeORM cli migration
  • MVC structure with controllers, services and dto

What's next

  • User authentication and password encryption
  • JSON Web Token (JWT)
  • Best practice

How to run

  • Check syntax error: npm run lint
  • Run in dev: npm run start:dev
  • Build in prod: node build.js
  • Run in prod: npm start
  • Generate migration: npm run typeorm:cli -- migration:generate -n CreateMyTable
  • Run migration: npm run typeorm:cli -- migration:run
  • Revert migration: npm run typeorm:cli -- migration:revert

Tutorials that I followed

About

Node.js Express demo project for restful web api server

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published