Skip to content

一個以 Node.js 和 Express 製作的短網址產生器,需要 MongoDB

License

Notifications You must be signed in to change notification settings

Prysline/S5A8_URLshortener

Repository files navigation

短網址產生器 URL shortener

Version License: MIT

目錄 Table of Contents
  1. 關於 About
  2. 入門 Getting Started
  3. 版權聲明 License
  4. 致謝 Acknowledgments

關於 About

一個以 Node.js 和 Express 製作的短網址產生器。 使用了 MongoDB 來儲存資料。

特色 Feature

  • 產生隨機五位數英數混和的縮址
  • 產生過縮址的網站會沿用既有縮址
  • 產生的縮址與舊有的縮址不會重複

截圖 Screenshot

index success

(back to top)

建置環境 Built With

(back to top)

入門 Getting Started

前置 Prerequisites

如果要使用 npm run dev 的指令,需先安裝 nodemon

  • nodemon
    npm install -g nodemon

必須於使用 mongoDB + mongoose 的環境下執行。

安裝 Installation

  1. 在要安裝的位置開啟終端機(terminal) clone 專案檔案
    git clone https://github.com/Prysline/S5A8_URLshortener.git
  2. 進入專案資料夾
    cd S5A8_URLshortener
  3. 安裝所需套件
    npm install
  4. 建立種子資料 (須連線 mongoDB 伺服器)
    npm run seed
  5. 使用 Node.js 執行 Express 伺服器(更新檔案時需要另外 ctrl+C 退出 Node.js 環境並重新啟動)
    npm run start
    或是使用 nodemon 執行 Express 伺服器(會在檔案變更時自動重啟伺服器,需安裝 nodemon)
    npm run dev
  6. 在瀏覽器網址列輸入 http://localhost:3000/ 瀏覽網站

(back to top)

版權聲明 License

使用 MIT License。

(back to top)

致謝 Acknowledgments

(back to top)

About

一個以 Node.js 和 Express 製作的短網址產生器,需要 MongoDB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published