Hello, I'm a university student from China.And I love Nim language so much.Indentation grammar, static type and efficiency draw my attentions.
For study purpose, I write a micro web framework, namely Prologue.Be careful: It still has a lot of bugs and can't work reliably.Tests and docs haven't finished.
Some features:
Hello Prologue:
proc hello*(ctx: Context) {.async.} =
resp "<h1>Hello, Prologue!</h1>"
let settings = newSettings(appName = "StarLight", debug = true)
var app = initApp(settings = settings, middlewares = @[stripPathMiddleware()])
app.addRoute("/", hello)
app.addRoute("/hello", hello, HttpGet)
app.run()
Any advice will be appreciated.
Any advice will be appreciated.
I would like to see builtin authentication or even a "capabilities" model and good database integration. Leave the "Micro web" framework behind, please give us a Django competitor. :-)
I have changed my mind.Prologue will become Medium scale Web Framework(just as django without models and Orm[Personally I think OOP is not elegant in Nim] but maybe support json schema).
Now support signing and session(based on signed cookie) and add basic cache support.
Regarding "good" database integration - the question of a higher-level database interface than the existing db worth an own thread. An important question is what query language should be used - SQL or something better suited for Nim? (Compare Java with JDBC/SQL vs. JPA/JPQL).
I've written a Nim interface nidurodb to the non-SQL RDBMS DuroDBMS which uses a relational algebra. IMHO it integrates nicely with Nim, but it may be considered too exotic compared to SQL.