- postgresql database running in docker for the local dev environment with configurable sql schema.
- kotlin backend using: Jetbrains’ Exposed and Ktor. Kluent and Junit5 for tests.
- backend secured with jwt tokens. It both creates and validates the tokens on selected routes.
- frontend: angular 7 + angular material
$ cd backend && gradle build
$ cd frontend && yarn && yarn build
- boot the database with
make db
in the root dir - execute the main function (in main.kt)
cd frontend && yarn start
- check localhost:4200
- build the backend:
cd backend && gradle build
- build the frontend:
cd frontend && yarn && yarn build
- go to the root dir and issue:
make
note
: you must havedocker
anddocker-compose
installed- check localhost:4200
- see this so question
- basically you have to issue a GET request containing a header row like this:
Key: 'Authorization'
Value: Bearer 'yourjwttokenASDFASDFdsfasdfDSAFasdfADfADfASdafAsdFASDF'
$ TOKEN=$(curl -s -X POST -d '{"name" : "alice", "password": "secret"}' -H "Content-Type: application/json" localhost:8080/login | jq -r '.token')
$ curl -H 'Accept: application/json' -H "Authorization: Bearer ${TOKEN}" https://localhost:8080/secret
GNU General Public License v3
Copyright (c) 2019-2021 Filipe Silva (ninrod)