-1

I need a best effective way for Node.js API Versioning.

Joker
  • 111
  • 2
  • 9

1 Answers1

1

REST API versioning

URL versioning

You can use routes named with versions

  • https://exapmpleapi/v1/...

Custom request header

You can create a new request header that contains the version.

  • Accept-version:v1
  • Accept-version:v2

Using accept header

You can use accept request header with the versions.

  • Accept :application/example.comv;version:1.0

For code

You can use github or gitbucket..

using npm modules

https://www.npmjs.com/package/express-api-versioning

Naveenkumar M
  • 616
  • 3
  • 17