feat: add main.rs, and rest requirements (#2)

* main.rs, docker, diesel database, makefile

* add license
10 files changed
tree: 3cb2306127e27e0f596a6e98e3b6324fee6eafcf
  1. .github/
  2. docker/
  3. migrations/
  4. model/
  5. src/
  6. .env
  7. .gitignore
  8. Cargo.toml
  9. diesel.toml
  10. LICENSE
  11. Makefile
  12. README.md
README.md

Casbin with Actix & PgSQL

A simple example, using Actix web, diesel-adapter and Postgresql.

Prerequisite

You need to have docker and docker-compose commands installed.

Run

Run make to setup and run the application.

Then open http://127.0.0.1:1080/?name=casbin, it should say OK which can mean you have access!

If you change the name to anything else, it would return a 403 response with Forbidden message.