不想写说明了 :(
这是一个记事本,也是一个粘贴箱
理论上应该支持全平台,测试过 Windows/Mac/Linux/FreeBSD 都能正常编译运行
[Unit]
Description=webnote service
[Service]
Environment=PORT=10003 DATA_DIR=/usr/local/webnote
ExecStart=/usr/local/webnote/webnote
Restart=on-failure
[Install]
WantedBy=multi-user.target- 检查代码
cargo check
cargo test
cargo fmt --all -- --check
cargo clippy -- -D warnings- 编译文件
cargo build --verbose --release/{id}GET/POST/GET/POST/-/{id}GET
# POST
curl -d t="text" 127.0.0.1:8080/test
curl -d "text" 127.0.0.1:8080
cat /etc/hosts | curl --data-binary @- 127.0.0.1:8080/test
cat /etc/hosts | curl -F f=@- 127.0.0.1:8080/b/GET/POST/b/{id}GET/DELETE
# POST
curl -F [email protected] 127.0.0.1:8080/b/
# DELETE
curl -X DELETE 127.0.0.1:8080/b/test -H 'token: 2A9B3F692B1715A6'- pereorga/minimalist-web-notepad
本质上这只是一个练手项目,用来学习用的
发展经过 php/mysql -> go/file -> go/sqlite -> rust/sqlite