-
-
Notifications
You must be signed in to change notification settings - Fork 20
SSR
Ethosa edited this page Jun 6, 2023
·
2 revisions
Basic Code of main.nim
import happyx
serve("127.0.0.1", 5000):
get "/":
"Hello, world!"
Compilation
nim c -r -d:debug main
Project structure:
project/
├─ src/
│ ├─ public/
│ │ ├─ hello.png
│ ├─ main.nim
├─ README.md
main.nim
import happyx
serve("127.0.0.1", 5000):
...
staticDir "public"
staticDir "/myPath" -> "public"