Just an attempt at versioning API's via tokens rather than url of accept header variations
- Must have
node
,npm
&mongodb
installed - The run
npm install
for all node dependencies
-
First run
npm run seed
- This generates the
keys
table in mongodb for the app to check against
- This generates the
-
Then run
node bin/www
-
Then you can visit a url like
http://0.0.0.0:3000/users?api_key=34567
and the response will tell you which version you are hitting.
To modify which version of the API you use, in the seed.js
file, all you need to change is the date when creating a key for the specific route.