Skip to content

foxoman/happyx

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Happyx

Asynchronous web-framework written in Nim with ♥

Nim language

wakatime

Testing

Why HappyX? 💁‍♀️

Because it's simple to use 🙂

Features ⚡

  • Support asynchttpserver as default http server
  • Support httpx via -d:httpx
  • Logging with -d:debug

Get Started 👨‍🔬

Installing 📥

Via Nimble

nimble install happyx

Via GitHub

nimble install https://github.com/HapticX/happyx

Usage ▶

import happyx

proc main =
  var server = newServer()

  server.routes:
    "/":
      req.answer("Hello, world!")
    
    "/user{id:int}"
      req.answer(fmt"Hello, user with ID {id}!")
  
  server.start()
  
main()

Run 💻

Default

nim c -r -d:ssl -d:debug main

Httpx

nim c -r -d:ssl -d:debug -d:httpx main

Contributing 🌀

You make us happy when sending PR or help us to find bugs and errors 🐛

About

Asynchronous web-framework written in Nim with ♥

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Nim 100.0%