Download Latest Version v4.5.2 source code.tar.gz (2.7 MB)
Email in envelope

Get an email when there's a new version of happyx

Home / v0.22.0
Name Modified Size InfoDownloads / Week
Parent folder
Powerful Mounts Are Here .tar.gz 2023-05-20 288.9 kB
Powerful Mounts Are Here source code.tar.gz 2023-05-20 288.9 kB
Powerful Mounts Are Here source code.zip 2023-05-20 309.8 kB
Powerful Mounts Are Here.zip 2023-05-20 309.8 kB
README.md 2023-05-20 823 Bytes
Totals: 5 Items   1.2 MB 0

Since v0.22.0 you can use powerful mounting with powerful routing 🥳

Mount declaration 🎈

:::nim
mount Settings:
  "/":
    ....

mount Profile:
  "/":
    ...

  mount "/settings" -> Settings

Mount usage 🔥

:::nim
serve(...):  # You can use appRoutes for SPA also 🙂
  mount "/profile" -> Profile

  "/":
    ...

Mounts is REALLY powerful âš¡

You can use path params in mounting:

:::nim
serve(...):  # or appRoutes
  mount "/<arg>/$id" -> SomeMount

Changelog

  • Add mounting 🔥
  • Add return statement for SSG apps ✨ nim serve(...): "/json": return {"response": "..."} "/html": return buildHtml: .... "/text": return "Hello, world!"
Source: README.md, updated 2023-05-20