-
Notifications
You must be signed in to change notification settings - Fork 0
Development :: Local
Matthew Sullivan edited this page Apr 18, 2020
·
3 revisions
Install dependencies
$ npm install
Install MongoDB
https://docs.mongodb.com/manual/administration/install-community/
Set environment and build database
$ export NODE_ENV=development && npm run db-init
$ npm run debug
Register
$ curl http://127.0.0.1:3000/api/v1/register/ -d 'email=[EMAIL]&firstName=[FIRST_NAME]&lastName=[LAST_NAME]&password=[PASSWORD]'
Login
$ curl http://127.0.0.1:3000/api/v1/login/ -d 'email=[EMAIL]&password=[PASSWORD]'
View Profile
$ curl http://127.0.0.1:3000/api/v1/profile/[USER_ID] -H 'Authorization: Bearer [ACCESS_TOKEN]'
Update Profile
$ curl http://127.0.0.1:3000/api/v1/user/profile -d 'email=[EMAIL]&firstName=[FIRST_NAME]&lastName=[LAST_NAME]' -H 'Authorization: Bearer [ACCESS_TOKEN]'
Update Password
$ curl http://127.0.0.1:3000/api/v1/user/password -d 'password=[PASSWORD]' -H 'Authorization: Bearer [ACCESS_TOKEN]'