Não pode escolher mais do que 25 tópicos
Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
Rohan Sircar
95e5c47c69
|
há 3 anos | |
---|---|---|
.github/workflows | há 3 anos | |
db | há 3 anos | |
migrations/2020-05-02-115427_create_users | há 4 anos | |
src | há 3 anos | |
static | há 3 anos | |
tests/integration | há 3 anos | |
.drone.yml | há 3 anos | |
.env | há 3 anos | |
.gitignore | há 3 anos | |
Cargo.lock | há 3 anos | |
Cargo.toml | há 3 anos | |
LICENSE | há 3 anos | |
Makefile.toml | há 3 anos | |
README.md | há 3 anos | |
build.Dockerfile | há 3 anos | |
build.Dockerfile.dockerignore | há 3 anos | |
build.rs | há 3 anos | |
ci.Dockerfile | há 3 anos | |
ci.Dockerfile.dockerignore | há 3 anos | |
diesel.toml | há 4 anos | |
rustfmt.toml | há 4 anos |
README.md
Testing out the Rust framework Actix-Web to create a JSON API CRUD Web App.
API Demo
Get Users
curl -X GET http://localhost:7800/api/users
{
"name": "user1",
"registration_date": "2020-05-09T06:17:26"
}
curl -X GET http://localhost:7800/api/users
[
{
"name": "user1",
"registration_date": "2020-05-09T06:17:26"
},
{
"name": "user2",
"registration_date": "2020-05-12T12:43:13"
},
{
"name": "user3",
"registration_date": "2020-05-15T07:47:50"
}
]
Create User
curl -H "content-type: application/json" \
-X PUT \
-i http://localhost:7800/api/users \
--data '{"name":"user4","password":"test"}'
[
{
"name": "user1",
"registration_date": "2020-05-09T06:17:26"
},
{
"name": "user2",
"registration_date": "2020-05-12T12:43:13"
},
{
"name": "user3",
"registration_date": "2020-05-15T07:47:50"
},
{
"name": "user4",
"registration_date": "2020-08-01T05:04:05"
}
]
Memory Usage
Memory usage as compared to interpreted languages was my primary motivation for looking into rust as a backend language. As of writing, the demo app uses less than 50MB of memory.
License
AGPLv3