No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
Rohan Sircar 95e5c47c69 remove unbounded get users api endpoint hace 3 años
.github/workflows update ci yml hace 3 años
db minor enhancements hace 3 años
migrations/2020-05-02-115427_create_users Many updates hace 4 años
src remove unbounded get users api endpoint hace 3 años
static remove unbounded get users api endpoint hace 3 años
tests/integration remove unbounded get users api endpoint hace 3 años
.drone.yml update drone yaml hace 3 años
.env many changes - mainly moving to refined newtypes hace 3 años
.gitignore make app docker volume friendly hace 3 años
Cargo.lock Add endpoints for search and pagination hace 3 años
Cargo.toml remove unbounded get users api endpoint hace 3 años
LICENSE Add license file hace 3 años
Makefile.toml add cargo-make makefile hace 3 años
README.md remove unbounded get users api endpoint hace 3 años
build.Dockerfile make app docker volume friendly hace 3 años
build.Dockerfile.dockerignore Changes to ci hace 3 años
build.rs add build-info endpoint hace 3 años
ci.Dockerfile make app docker volume friendly hace 3 años
ci.Dockerfile.dockerignore Changes to ci hace 3 años
diesel.toml first commit hace 4 años
rustfmt.toml Implemented basic auth logic + other stuff hace 4 años

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