一個使用 Express + node.js 建立的 middleware
- 伺服器收到任何來自瀏覽器的 request 時,都會自動把資訊紀錄到 server log 裡,包括:
- 時間戳記 (time-stamps) - 以當地時間 (台北) 顯示
- 請求的 HTTP 方法
- URL
1.開啟終端機(Terminal)cd 到存放專案本機位置並執行:
git clone https://github.com/Goater1095/Middleware.git
2.初始
cd Restaurant-List //切至專案資料夾
npm install //安裝套件
3.開啟程式
npm run dev //執行程式
終端顯示 This Server start on http://localhost:3000 即啟動完成,請至 http://localhost:3000 開始使用程式
- Visual Studio Code - 開發環境
- Node.js - 執行環境
- Express - 應用程式架構