A simple authentication app made with Express & Node.js
brew install mongodb
mongod
npm install
npm start
curl -X POST -d '{"newEmail":"example@email.com", "password":"asdf"}' --header "Content-Type: application/json" --header "Accept: application/json" localhost:3000/auth
curl -X POST -d '{"email":"example@email.com", "password":"asdf"}' --header "Content-Type: application/json" --header "Accept: application/json" localhost:3000/auth
curl -X GET -d '{"token": "some-token"}' --header "Content-Type: application/json" --header "Accept: application/json" localhost:3000/user
Optional: newEmail, newPassword
curl -X POST -d '{"token": "some-token", "newEmail": "new@email.com", "newPassword": "new-password"}' --header "Content-Type: application/json" --header "Accept: application/json" localhost:3000/user
curl -X DELETE -d '{"token":"some-token"}' --header "Content-Type: application/json" --header "Accept: application/json" localhost:3000/user