Skip to content

topseom/node-note

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 

Repository files navigation

Node-js Andrew Course

Node-js

nodejs - basic package

  • fs (file system to create note application)
  • yargs (node user input in terminal or cmd)

nodejs - server package

  • express (Use to create node-web-server such as restful-api,webapplication)
  • hbs (Handlebar template engine for create view web-application like php,python,ruby)

nodejs - testing package

  • mocha (For use write test-case list)
  • expect (For use Assertion test)
  • supertest (For use Assertion test with promise or create restful api test)
  • rewire (For use spies for coppy function or process fake not sending, use with expect package to create spy)

nodejs - mongo package

  • mongoose (Mongodb ORM use to create model,schema and validation)

Mongodb

Install

  • install mongodb
  • unpack and moving in to directory user
  • create mongo-data folder
  • cd to /bin and use command ./mongod --dbpath ~mongo-data
  • run mongo success!

Tools

  • robomongo (desktop application for gui mongodb structure like phpmyadmin)

Schema

  • structure model mongodb database for add method,validation

Deploy

Git-hub

(For Fist-time)

(Use)

  • create respo
  • git init
  • git commit -am 'Initial Commit'
  • git remote <git:url>
  • git push origin master

Heroku

(Setup)

(Use)

  • go to directory
  • create heroku use command heroku create

Case have credit card

  • for use addons(like mongolab) heroku addons:create mongolab:sandbox

Case Not have credit card


  • push heroku to server git push heroku
  • view web-page to input heroku open
  • success!

Authentication and Validator

Validator

JSON WEB TOKEN (JWT)

  • jsonwebtoken package for cyrpto use JSON WEB TOKEN method by SHA256(JSON.stringify(data+salt)).toString()

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published