Tech
Node.js/ Express.js / Mongo DB/ Mongoose(ODM) /postman /
bodypaser: to receive data from requirest
-
創建3個services , students, teachers, classes
students service
-
load express
-
load mongoose
-
connect
-
使用post方法傳遞數據到MongoDB
-
use findbyidAndRemove to delete data
-
use find and findById to search data
-
連接數據庫的student.js
-
load mongoose
-
model
teachers service
-
load express
-
load mongoose
-
connect
-
數據庫的互動和student service 一樣
classes service
-
我們需要 teacherID to hold teacher identitiy
-
用學生ID 看哪個老師來進行教授
-
gotdate 入學時間
-