Skip to content

boxunw/url_shortener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

短網址產生器 URL shortener

將長網址轉換為短網址的工具,使得URL更簡潔、易於分享和使用

Features - 產品功能

  1. 使用者可以在表單輸入原始網址

image

按下Shorten送出表單之後,畫面會回傳相對應的短網址

image

  1. 網址可以直接按copy複製至剪貼簿
  2. 網址列空白即送出會出現提示
  3. 點擊中間迴紋針圖示會回到首頁

Environment SetUp - 環境建置

  1. Node.js
  2. express 4.17.1
  3. express-handlebars 4.0.2
  4. nodemon 2.0.22
  5. MongoDB Atlas 資料庫
  6. Robo 3T 資料庫管理工具
  7. Mongoose 5.13.19
  8. dotenv 16.3.1

Installing - 安裝流程

  1. 請先確認已安裝Node.js,若無,至環境建置第1項點擊安裝
  2. 請先至MongoDB Atlas雲端資料庫申請及使用Robo 3T創建資料庫後取得以下連線字串
mongodb+srv://<Your account>:<Your password><server location>/<database name>?retryWrites=true&w=majority
  1. 開啟終端機(Terminal),指令cd到欲放置專案位置,Clone此專案至本機電腦
git clone https://github.com/boxunw/url_shortener.git
  1. 打開專案資料夾
cd url_shortener
  1. 新建.env檔案,並貼上以下字串
MONGODB_URI=第2項取得的連線字串
  1. 安裝 npm 套件
npm install
  1. 開啟程式
npm run dev
  1. 等待終端機出現以下字樣
mongodb connected!
  1. 在瀏覽器輸入以下網址即可開始使用此工具
http://localhost:3000

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published