Skip to content

課程實作用後端 Web API 程式

Latest
Compare
Choose a tag to compare
@doggy8088 doggy8088 released this 15 Mar 13:47
· 6 commits to master since this release

下載與啟動說明 (請先閱讀)

請先依據不同作業系統平台下載本課程專用的後端主程式,然後參照以下命令進行設定與安裝。

  • Windows:請開啟 Powershell 執行以下命令直接下載 ProtractorLabsBE.exe 並滑鼠雙擊啟動。

    $ProgressPreference = 'SilentlyContinue'
    [Net.ServicePointManager]::SecurityProtocol = "tls12, tls11"
    Invoke-WebRequest -Uri https://github.com/duotify/ProtractorLabs/releases/download/v1.0/ProtractorLabsBE.exe -OutFile ProtractorLabsBE.exe
    .\ProtractorLabsBE.exe

    如果你的電腦是 32-bit 作業系統,請下載 ProtractorLabBE_x86.zip 並且壓縮後執行 *.exe 執行檔。

  • macOS:請開啟 Terminal 執行以下命令:

    curl -sL https://github.com/duotify/ProtractorLabs/releases/download/v1.0/ProtractorLabsBE -o ProtractorLabsBE
    chmod a+x ProtractorLabsBE
    ./ProtractorLabsBE

請用以下網址測試 Web API 是否可正常連線:http://localhost:5000/api/events

如果你想要重置所有 API 提供的資料,直接連到 http://localhost:5000/api/events/initialdata 即可重置所有資料。當然,當你重新執行後端 API 的執行檔,所有資料也會被重設。