HUB
Sign inSign up
hello-rust logo

apiprimer/hello-rust

By apiprimer

•Updated over 1 year ago

Uses Rust Actix framework for exposing an API

Image
Languages & frameworks
0

190

apiprimer/hello-rust repository overview

This is a Hello API⁠, which exposes two endpoints, GET and POST and return the response in the following structure,

{"from":"Rust - Actix","message":"Hello from Rust","status":true}

Pull the image and run them on desired port. To test the endpoints use curl or another API testing tool.

GET

curl http://localhost:8080/
{"from":"Rust - Actix","message":"Hello from rust","status":true}

POST

curl http://localhost:8080/ -X POST -H 'Content-Type: application/json' --data '{"name":"YOUR_NAME"}
{"from":"Rust - Actix","message":"Hello, YOUR_NAME!","status":true}
Tag summary
Recent tags
Content type
Image
Digest
sha256:0902fa1c0…
Size
28.4 MB
Last updated
over 1 year ago
docker pull apiprimer/hello-rust:latest