use Nim with mofuw
$ nimble install mofuw
$ nimble install dotenv
$ nimble install jwt
$ cp .env.default .env
$ sh setup.sh YOUR_PROJECT_NAME # change project name
$ nimble server # start server
Implementing Domain-Driven-Design(Eric's Layered architecture)
/docs # PostMan collection
/src
|
| - /nim_web_apipkg
|
| - nim_web_api.nim
| - /applications # Request handlers
| - /domains # Action domains
| - /gateways # Thirdparty action gateways
| - /models # DB Models
| - /utils # Utility actions
# ...etc...
- POST -
/api/register
(name, mail_address, password) - POST -
/api/signin
(mail_address, password) returns JWT token. - POST -
/api/me
Set JWT-token to Bearer.