dom96 / jester

A sinatra-like web framework for Nim.
MIT License
1.56k stars 120 forks source link

Can't import the newSettings function qualified #282

Closed AjBreidenbach closed 1 year ago

AjBreidenbach commented 2 years ago

The following code

import jester except newSettings, settings

router myRouter:
  get "/library":
    resp "library"

when isMainModule:

  let mySettings = jester.newSettings(
    port=Port(7000)
  )

  var jesterInstance = initJester(myRouter, mySettings)
  serve(jesterInstance)

fails to compile with

/tmp/test.nim(4, 8) template/generic instantiation of `router` from here
/home/andrew/projects/jester/jester.nim(831, 20) Error: undeclared identifier: 'newSettings'

The issue seems to be fixed with this commit https://github.com/AjBreidenbach/jester/commit/2c58c0e72e8df28ae76c330e1718ddf4aa070287

dom96 commented 2 years ago

can you make a PR? :)