https://github.com/nugine/pastebin
在线剪贴板
https://github.com/nugine/pastebin
Last synced: 18 days ago
JSON representation
在线剪贴板
- Host: GitHub
- URL: https://github.com/nugine/pastebin
- Owner: Nugine
- License: agpl-3.0
- Created: 2020-04-02T04:18:15.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-05-28T08:01:05.000Z (11 months ago)
- Last Synced: 2024-05-29T13:24:34.360Z (11 months ago)
- Language: Rust
- Homepage:
- Size: 3.15 MB
- Stars: 23
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pastebin
在线剪贴板
## 开发
前置要求
+ Node.js
+ Rust
+ Nginx
+ Redis
+ [just](https://github.com/casey/just)下载后端依赖
```bash
cd pastebin-server
cargo fetch
```下载前端依赖
```bash
cd pastebin-front
npm install
```启用 nginx 配置文件
```bash
sudo ln -s $PWD/pastebin.nginx.conf /etc/nginx/sites-enabled/pastebin
sudo nginx -t
sudo nginx -s reload
```启动后端
```bash
cd pastebin-server
cargo run --release
```启动前端开发服务器
```bash
cd pastebin-front
npm run dev
```打开页面
## 部署
编译并打包前端与后端
```bash
just dist
```将 dist 目录下的最新压缩包上传至服务器,解压并修改配置,自行部署
## 其他
删除生成文件,释放空间
```bash
just clean
```