ssyctlm / RestfullAPI

Build a restful api by using nodejs and mongoose

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A practice

I have a plan for this pracitce:

-First: A step by step practice to achieve a restful API program, to familiar with nodejs, ExpressJs, Mongodb, Mongoose and other micro server stuffs.

-Second: Convert this product/order program to a todo program

-Third: Make frontend user interface

-Forth: Pack this whole program with electron

ExpressJs

Mongoose

  • schema
  • model
  • querry
  • crud

-- dependencies : multer: to parse html form data

Log:

  • 7/9/20 - Failed when I use populate to chain product with order. Don't know how to fix it, move on and leave it temporary.

  • 7/10/20 - Multer middleware installed and using it to parse formData from postman.

  • 7/15/20 - successfully achieve image upload functionality

  • 7/15/20 - User Authorize
    - Introduce a password encrypt package node.bcrypt.js

  • 7/18/20 - User login and token generate
    - new library jsonwebtoken was introduced to handle token generation and signing works for us.
    - Parse the token using JWT

  • 7/20/20 - write a customed middleware to protect the api data

About

Build a restful api by using nodejs and mongoose


Languages

Language:JavaScript 100.0%