Skip to content

[Attempt at a] RemoteStorage server written in rust

License

Notifications You must be signed in to change notification settings

FlexWilliams/CrateRs

Repository files navigation

CrateRs (W.I.P)

[An attempt at] A remoteStorage web server written in rust.

(TODO: tag frameworks used).

Project Management

Project Board

Development

Building

cargo clean && cargo build

Running

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!




Building & Running with Docker

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



API Requests:

HEAD a folder/document

curl -I 'http://127.0.0.1:8000/storage/'

Reponse: TBD


GET a folder/document

curl -XGET 'http://127.0.0.1:8000/storage/'

Reponse: TBD


PUT a document

curl -XPUT 'http://127.0.0.1:8000/storage/file.txt'

Reponse: HTTP 201 File created!


(TRY TO) PUT a folder

curl -XPUT 'http://127.0.0.1:8000/storage/'

Reponse: HTTP 400 - The specified path is a directory! Unable to proceed.


DELETE a document

curl -XDELETE 'http://127.0.0.1:8000/storage/file.txt'

Reponse: HTTP 200 File deleted!


(TRY TO) DELETE a folder

curl -XDELETE 'http://127.0.0.1:8000/storage/'

Reponse: HTTP 400 - The specified path is a directory! Unable to proceed.

About

[Attempt at a] RemoteStorage server written in rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published