Skip to content
This repository has been archived by the owner on Dec 4, 2022. It is now read-only.

OdaDaisuke/nim-api-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mofuw(Nim) API Boilerplate

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

Design pattern

Implementing Domain-Driven-Design(Eric's Layered architecture)

Directory

/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...

Endpoints

  • POST - /api/register (name, mail_address, password)
  • POST - /api/signin (mail_address, password) returns JWT token.
  • POST - /api/me Set JWT-token to Bearer.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published