Name | Modified | Size | Downloads / 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!"