- 打開 pgAdmin 並以使用者
postgres
身分登入。 - 建立一個資料庫並命名為
wormGym
。 - 右鍵點選建立的資料庫,並且選擇
Restore
。 - 選擇
wormGym_custom.sql
作為 restore 的檔案。 - 建立另一個資料庫並命名為
wormGym_test
,並且同wormGym
資料庫 restorewormGym_custom.sql
檔案。
先確認電腦已安裝 Node.js
並且將上述資料匯入資料庫,打開終端機移動到本專案資料夾位置。
所需套件與版本已定義在 package.json
裡,執行下列指令以完成下載。
npm install
cd backend
npm install
打開 db.js
並將 password
改成 postgres
對應的密碼。
npm start
或是
node ./bin/www
所需套件與版本已定義在 package.json
裡,執行下列指令已完成下載。
cd frontend
npm install
執行下列指令
npm start
若無自動開啟瀏覽器,請手動開啟 http://localhost:3000/ ,看到登入畫面即代表成功開啟前端且前後端連接成功。