Skip to content

Releases: HapticX/happyx

v0.4.6

02 Apr 06:25
Compare
Choose a tag to compare

Changelog

  • Support middleware (#3) and request methods (#3) in server 🌟
    server.routes:
      get "/":
        req.answer "Root via GET"
      post "/":
        req.answer "Root via POST"
      middleware:
        echo req
  • Support JSON and HTML answers (#2) 📤
    var
      server = newServer()
      userId = 0
    server.routes:
      get "/html":
        req.answerHtml:
          buildHtml(`div`):
            script(src="https://cdn.tailwindcss.com")  # Tailwind CSS :D
            `div`(class="bg-gray-700 text-pink-400 px-8 py-24"):
              "Hello, world!"
    
      post "/user":
        inc userId
        req.answerJson {"response": {"id": %userId}}
  • Some improves and fixes 🐛

v0.4.5

01 Apr 15:09
Compare
Choose a tag to compare

Changelog

  • Support variables in strings in if and for statements
  • Support attributes and children if and for statements
  • Support variables in curly brackets:
    var state = remember true
    var html = buildHtml(`div`):
      {state}
  • if and for statements does not generates root tags.

v0.4.4

30 Mar 15:49
Compare
Choose a tag to compare

Changelog

  • Support for statement in buildHtml macro.
  • Refactor renderer.nim, tag.nim

v0.4.2

30 Mar 02:44
Compare
Choose a tag to compare

Improve tag.nim and renderer.nim

v0.4.0

29 Mar 15:18
Compare
Choose a tag to compare

SPA? 👀

v0.3.0

29 Mar 01:05
Compare
Choose a tag to compare

Changelog

  • Support httpx via -d:httpx