Skip to content

demonmhon/express-4x-api-starter

Repository files navigation

express-4x-api-starter

The express 4x starter for RestAPI project. Also Docker provided for production build.

Getting started

Set your environment variables, update all variables in .env with correct values

$ cp .env.example .env

Install dependencies

$ npm install

Start app

For development, will start using nodemon

$ npm run start:dev

Starter routes

  • /v1/docs
  • /v1/users

Versioning

Starter route will provide API version with:

http://localhost:3000/
http://localhost:3000/v1/
http://localhost:3000/latest/

Which point the the same controller. Each version stay on it own folder. So, it would be easy to manage API versions.

For example, when release /v4. The /latest will be point to /v4 as well. While we could remove /v1 from route as deprecated version.

/v1/ ---> (removed)
/v2/
/v3/
/v4/ ---> /latest/

It depends, if version need to be specified.

/  ---> /latest/

License

MIT

About

The starter API service setup with express.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published