https://github.com/rockncoder/nov11
Day 2's base code
https://github.com/rockncoder/nov11
Last synced: about 1 year ago
JSON representation
Day 2's base code
- Host: GitHub
- URL: https://github.com/rockncoder/nov11
- Owner: Rockncoder
- Created: 2017-11-11T15:26:00.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-15T20:51:14.000Z (over 8 years ago)
- Last Synced: 2025-02-15T11:20:22.653Z (over 1 year ago)
- Language: JavaScript
- Size: 1.06 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Node Bootcamp
This app demonstrates using restify to create a microservice RESTful API in Node.js.
* The API use webtokens to secure
* Shows how to decompose node apps using modules
* Use socket.io to support messaging
* More features coming later
How this project was built:
* mkdir nov11
* cd nov11
* npm init
* npm i -s restify bunyan restify-bunyan-logger restify-jwt-community jsonwebtoken socket.io delivery
* Install Jasmine globally
* npm install -g jasmine
### JSON Web Tokens
In order to get a token, call the "/token" path with your email + password in the post body as JSON. It much match one of the accounts in users.js.
A token will be returned. Then return that token on all calls to subsequent paths in the header as a Bearer token:
Authorization: Bearer
### socket.io ###
Tester:
* http://amritb.github.io/socketio-client-tool/#
* http://localhost:8000/
### Online References ###
* https://www.npmjs.com/package/bunyan
* https://www.npmjs.com/package/delivery
* https://thiscouldbebetter.wordpress.com/2015/08/21/a-simple-web-server-in-node-js-with-a-mariadb-backend/
* https://www.tutorialspoint.com/socket.io/socket.io_environment.htm
* https://socket.io/get-started/chat/
* https://blog.risingstack.com/node-js-mysql-example-handling-hundred-gigabytes-of-data/
* https://mariadb.org/mariadb-non-blocking-client-api-and-node-js/
* npm install restify-jwt* https://scotch.io/tutorials/authenticate-a-node-js-api-with-json-web-tokens
* https://www.owasp.org/index.php/Password_Storage_Cheat_Sheet