[An attempt at] A remoteStorage web server written in rust.
(TODO: tag frameworks used).
cargo clean && cargo build
cargo run
The server will be listening on: http://127.0.0.1:8000
Make a request via curl to test:
curl -XGET 'http://127.0.0.1:8000'
HTTP Repsonse Body: Hello, from CrateRs!
To build:
cargo clean && docker build --tag=crate-rs:latest -f Dockerfile
To run:
docker run -it --rm -p 8000:8000 -e ROCKET_PROFILE='docker' crate-rs
curl -I 'http://127.0.0.1:8000/storage/'
Reponse: TBD
curl -XGET 'http://127.0.0.1:8000/storage/'
Reponse: TBD
curl -XPUT 'http://127.0.0.1:8000/storage/file.txt'
Reponse: HTTP 201 File created!
curl -XPUT 'http://127.0.0.1:8000/storage/'
Reponse: HTTP 400 - The specified path is a directory! Unable to proceed.
curl -XDELETE 'http://127.0.0.1:8000/storage/file.txt'
Reponse: HTTP 200 File deleted!
curl -XDELETE 'http://127.0.0.1:8000/storage/'
Reponse: HTTP 400 - The specified path is a directory! Unable to proceed.