Skip to content

nibazshab/webnote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

不想写 README 了 : (

启动

systemd service

[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

API

  • /{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'

About

网页记事本

Resources

License

Stars

Watchers

Forks