jester icon indicating copy to clipboard operation
jester copied to clipboard

Can't import the newSettings function qualified

Open AjBreidenbach opened this issue 4 years ago • 1 comments

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

AjBreidenbach avatar Aug 25 '21 00:08 AjBreidenbach

can you make a PR? :)

dom96 avatar Aug 25 '21 20:08 dom96