Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
Rohan Sircar 95e5c47c69 remove unbounded get users api endpoint 3 лет назад
.github/workflows update ci yml 3 лет назад
db minor enhancements 3 лет назад
migrations/2020-05-02-115427_create_users Many updates 4 лет назад
src remove unbounded get users api endpoint 3 лет назад
static remove unbounded get users api endpoint 3 лет назад
tests/integration remove unbounded get users api endpoint 3 лет назад
.drone.yml update drone yaml 3 лет назад
.env many changes - mainly moving to refined newtypes 3 лет назад
.gitignore make app docker volume friendly 3 лет назад
Cargo.lock Add endpoints for search and pagination 3 лет назад
Cargo.toml remove unbounded get users api endpoint 3 лет назад
LICENSE Add license file 3 лет назад
Makefile.toml add cargo-make makefile 3 лет назад
README.md remove unbounded get users api endpoint 3 лет назад
build.Dockerfile make app docker volume friendly 3 лет назад
build.Dockerfile.dockerignore Changes to ci 3 лет назад
build.rs add build-info endpoint 3 лет назад
ci.Dockerfile make app docker volume friendly 3 лет назад
ci.Dockerfile.dockerignore Changes to ci 3 лет назад
diesel.toml first commit 4 лет назад
rustfmt.toml Implemented basic auth logic + other stuff 4 лет назад

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