Description
Hi Zhang,
Have you thought to maybe include some kind of simple example project for users to download + run to experiment with (learn) nginx-clojure?
The quick start guide looks good, but maybe still a bit intimidating (scary) for people who are not familiar with configuring nginx modules, etc.?
For example, in the quick start guide, you have an inline handler like:
(fn[req]
{:status 200,
:headers {"content-type" "text/plain"},
:body "Hello Clojure & Nginx!"})
But as a Clojure developer - I think: how can I connect nginx-clojure to my Clojure application if I am using a Compojure router, etc. The documents say this is possible, but I could not find somewhere to say exactly how?
So maybe a useful example project could include:
- A small Clojure application using Compojure and a few routes with simple text responses: "route 1 response", "route 2 response", etc.
- The right
nginx.conf
for this small Clojure application. - Any special startup scripts that may be needed.
- Maybe some comments about: is there anything special we need to do for sessions, etc.
Some questions that I still have after looking at the documents:
- Is it possible to convert any standard Jetty Clojure application to use
nginx-clojure
? - Is this usually difficult (it needs a lot of work), or is it usually quite easy?
- Are there any limitations (problems/disadvantages) with using
nginx-clojure
instead of something like Jetty or http-kit? - Is better performance the main advantage to using
nginx-clojure
instead of something like Jetty or http-kit?
The nginx-clojure performance looks very good. I think probably some Clojure developers would look more closely at nginx-clojure
if these few things could be a bit more clear.
Does that make sense?
I hope these comments are useful, good luck with the project!
(Also, I will try release the new Sente version later today).