Skip to content

heftybyte/api-version

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

20 Commits

Repository files navigation

Deprecated

Use the mounting feature in express instead http://expressjs.com/en/4x/api.html#app.onmount

api version ====

Wrapper for express routing methods to help with versioning apis

##Usage

>varapiv=require('api-version');>varapp=express();>varapi=apiv.version(app,'/api','v1');>varapi2=apiv.version(app,'/api','v2');>api.get('/user',function(){>});>api.post('/user',function(){>});>api2.get('/user',function(){>});>```>Since the routes were added using api instead of app, the routes turn out to be>```/api/v1/user

and

/api/v2/user

About

Wrapper for express routing methods to help with versioning apis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published