Template engine是什麼
模板引擎幫助我們在靜態的html檔案中插入一些動態的變數,使頁面的呈現可以實際與資料互動。模板引擎可以讓介面與資料分離,提升開發的效率使分工更明確,還可以減少重複程式碼的產生。
經過模板引擎的編譯,最終會回傳一般的html檔案到用戶端。
1 | //need to include nodejs core moudul 'http' |
Authentication | Authorization |
---|---|
識別對資料庫來說有效的使用者 | 識別有效的使用者中他們能做什麼操作 |
比喻: 例如一家公司的員工被允許進入辦公室 | 比喻: 公司的員工帳號允許進入辦公室並處理訂單 |
Administrator | Developer/Your app | Data Scientist |
---|---|---|
能管理資料庫的設定,新增使用者 | 需要進行新增、刪除、閱讀等操作(CRUD) | 需要能夠抓取資料 |
不需要新增或取用資料 | 不需要新增使用者或管理資料庫設定 | 不需要進行新增、刪除等操作 |
1 | mongod --dbpath "路徑" //指定資料的存放路徑 |
1 | net stop MongoDB //windows |
1 | use admin //進入admin collection |