personal-measure/api/src/main/nim/personal_measure_api.nim

26 lines
451 B
Nim

import asyncdispatch, bcrypt, docopt, jester, json, jwt
import personal_measure_apipkg/db
type
PersonalMeasureApiConfig = object
port*: int
pwdCost*: int
dbConnString*: string
proc start*(cfg: StrawBossConfig): void =
var stopFuture = newFuture[void]()
var workers: seq[Worker] = @[]
settings:
port = Port(cfg.port)
appName = "/api"
routes:
get "/version":
resp($(%("strawboss v" & SB_VERSION)), JSON)