Go to file
2021-05-20 18:39:20 +05:30
.github/workflows update ci yml 2021-05-05 20:16:07 +05:30
db minor enhancements 2021-04-23 21:10:02 +05:30
migrations/2020-05-02-115427_create_users Many updates 2020-05-09 12:07:08 +05:30
src remove unbounded get users api endpoint 2021-05-20 18:39:20 +05:30
static remove unbounded get users api endpoint 2021-05-20 18:39:20 +05:30
tests/integration remove unbounded get users api endpoint 2021-05-20 18:39:20 +05:30
.drone.yml update drone yaml 2021-04-28 16:37:04 +05:30
.env many changes - mainly moving to refined newtypes 2021-05-15 19:27:06 +05:30
.gitignore make app docker volume friendly 2021-04-27 16:52:27 +05:30
build.Dockerfile make app docker volume friendly 2021-04-27 16:52:27 +05:30
build.Dockerfile.dockerignore Changes to ci 2021-04-24 22:46:11 +05:30
build.rs add build-info endpoint 2021-05-05 23:30:45 +05:30
Cargo.lock Add endpoints for search and pagination 2021-05-18 19:43:18 +05:30
Cargo.toml remove unbounded get users api endpoint 2021-05-20 18:39:20 +05:30
ci.Dockerfile make app docker volume friendly 2021-04-27 16:52:27 +05:30
ci.Dockerfile.dockerignore Changes to ci 2021-04-24 22:46:11 +05:30
diesel.toml first commit 2020-05-06 18:56:24 +05:30
LICENSE Add license file 2021-05-05 23:16:15 +05:30
Makefile.toml add cargo-make makefile 2021-05-12 17:58:43 +05:30
README.md remove unbounded get users api endpoint 2021-05-20 18:39:20 +05:30
rustfmt.toml Implemented basic auth logic + other stuff 2020-05-12 01:03:11 +05:30

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