diff --git a/.gitignore b/.gitignore index 86ec4eb..eaa6293 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ +# Text editor things +*.kate-swp + # Binary name built by nimble nimblog diff --git a/README.md b/README.md index 62c184e..87060c8 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ # nimblog Placeholder text + +## How to run + +1. Install your distro's `nim` package or equivalent +2. Navigate to the folder where this README is located +3. Fetch dependencies, compile and run: `nimble run` diff --git a/nimblog.nimble b/nimblog.nimble index 39776fe..ce55c32 100644 --- a/nimblog.nimble +++ b/nimblog.nimble @@ -11,3 +11,4 @@ bin = @["nimblog"] # Dependencies requires "nim >= 1.6.0" +requires "prologue >= 0.5.6" diff --git a/src/nimblog.nim b/src/nimblog.nim index 862d40c..b28db56 100644 --- a/src/nimblog.nim +++ b/src/nimblog.nim @@ -1,5 +1,11 @@ -# This is just an example to get you started. A typical binary package -# uses this file as the main entry point of the application. - when isMainModule: - echo("Hello, World!") + import prologue + + proc placeholder*(ctx: Context) {.async.} = + resp "Have a nice day" + + let blog = newApp() + + blog.get("/", placeholder) + + blog.run()