Skip to content
This repository has been archived by the owner on Apr 8, 2020. It is now read-only.
/ Blossom Public archive

Minimalistic web framework built in Nim

License

Notifications You must be signed in to change notification settings

amka/Blossom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blossom

Blossom

Blossom is a minimalistic web framework built in nim languge largely inspired by Bottle, Redstone and Jester.

Example

import sugar
import blossom

proc main() =
    # Initialize application
    let settings = newSettings()
    var blossom = initApp(settings)

    # Add a couple of routes
    blossom.router.addRoute("/", 
        proc(req: Request): Future[void] = 
            req.respond(Http200, "Blossom is gorgeous!")
    )

    # And route with sugar macro
    blossom.router.addRoute("/sugar", (req: Request) =>
        req.respond(Http200, "Sugar is sweet!")
    )

    # Start server
    blossom.serve()

when isMainModule:
    main()

Roadmap

  • Static routing
  • Dynamic routing
  • Templating
  • Logging

Icon

Icon generously provided by Icons8.

Releases

No releases published

Packages

No packages published

Languages