https://github.com/czzonet/cwd-static-server
一个基于 nodejs、express 的静态文件服务器。
https://github.com/czzonet/cwd-static-server
express node static-server
Last synced: 5 months ago
JSON representation
一个基于 nodejs、express 的静态文件服务器。
- Host: GitHub
- URL: https://github.com/czzonet/cwd-static-server
- Owner: czzonet
- License: apache-2.0
- Created: 2020-07-18T14:47:07.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-18T14:48:01.000Z (over 5 years ago)
- Last Synced: 2025-02-05T17:27:20.135Z (about 1 year ago)
- Topics: express, node, static-server
- Language: TypeScript
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# static server
一个基于 nodejs、express 的静态文件服务器。
- build.sh: 编译打包`./dist ./ecosystem.config.js ./package.json`
- ecosystem.config.js: pm2 的配置文件
- package.json: 依赖包
## 调试
```sh
yarn dev
```
## 编译
```sh
./build.sh
```
## 部署
拷贝编译打包产物,解压到 server 文件夹,新建 dist 文件夹放静态页面文件。
进入 server 文件夹,安装依赖,修改端口,pm2 守护启动。
```sh
yarn
pm2 start ecosystem.config.js
```