src/prologue/core/naive/server

Source   Edit  

Types

Prologue = ref object
  gScope*: GlobalScope
  middlewares*: seq[HandlerAsync]
  startup*: seq[Event]
  shutdown*: seq[Event]
  errorHandlerTable*: ErrorHandlerTable
Source   Edit  
Server = AsyncHttpServer
Source   Edit  

Procs

proc execStartupEvent(app: Prologue) {....raises: [ValueError, Exception, OSError],
                                       tags: [TimeEffect, RootEffect],
                                       forbids: [].}
Source   Edit  
func newPrologue(settings: Settings; ctxSettings: CtxSettings; router: Router;
                 reversedRouter: ReversedRouter; reRouter: ReRouter;
                 middlewares: openArray[HandlerAsync];
                 startup: openArray[Event]; shutdown: openArray[Event];
                 errorHandlerTable: ErrorHandlerTable; appData: StringTableRef): Prologue {.
    inline, ...raises: [KeyError], tags: [], forbids: [].}
Source   Edit  
proc serve(app: Prologue; callback: proc (request: NativeRequest): Future[void] {.
    closure, ...gcsafe.}) {.inline, ...raises: [ValueError, Exception, OSError], tags: [
    TimeEffect, RootEffect, WriteIOEffect, ReadIOEffect], forbids: [].}
Serves a new web application. Source   Edit  
proc serveAsync(app: Prologue; callback: proc (request: NativeRequest): Future[
    void] {.closure, ...gcsafe.}): owned(Future[void]) {.inline, ...stackTrace: false,
    raises: [Exception],
    tags: [WriteIOEffect, ReadIOEffect, RootEffect, TimeEffect], forbids: [].}
Serves a new web application. Source   Edit