# 1. 克隆代码
git clone https://github.com/wanghaida/shorturl.git
# 2. 进入文件夹
cd shorturl
# 3. 创建环境变量
cp .env.example .env
# 4. 安装依赖
npm install
- 修改
.env
中的配置 - 执行
static/database.sql
脚本
# 5. 运行命令
npm run dev
# 5. 构建项目
npm run build
# 6. 启动项目
npm run start