404.js 500.js model-finder.js
npm start
{"username":"example","password":"example-password"}' | http post :4000/signup
http :4000/signin -a example:example-password
echo ‘{“role”:“test”,“capabilities”:[“test”]}’ | http post :3000/newrole
http :4000/oauth "Authorization:Bearer ENTER TOKEN HERE
####json-model-data
- players and teams database
players:
{"name": "name", "team", "team"}
team:{"team": "team"}
http get :4000/api/v1/{model} -a username:p
712C
assword
http get :4000/api/v1/{model}/{id} -a username:password
echo '{ json-model-data }' | http post :4000/api/v1/{model} -a username:password
echo '{ json-model-data }' | http put :4000/api/v1/{model}/{id} -a username:password
http delete :4000/api/v1/{model}/{id} -a username:password
PORT
- 4000MONGODB_URI
- mongodb://localhost:27017/usersSECRET
- string for mongo secret
npm start
- Endpoint: app.js
- Endpoint:
/signup
- Enters user in the mongo database and allows them to signup
- Endpoint:
/singin
- Signs in a user with correct credentials
- Endpoint:
/newrole
- Allows users to add a new role into the database
- How do you run tests?
npm run tests