0.4.1 (2015-08-12)

   1. New Feature: Coroutine based socket supports unix domain socket
   2. New Feature: APIs for Embedding Nginx-Clojure into a standard
   Clojure/Java/Groovy App (issue #86
   <https://github.com/nginx-clojure/nginx-clojure/issues/86>). This
   feature make debug/test with Nginx Clojure/Java/Groovy handlers very easy.
   3. New Feature: Autodetect jvm_path (issue #85
   <https://github.com/nginx-clojure/nginx-clojure/issues/85>)
   4. New Feature: Support to use annotation to mark a class or method to
   be suspenable in coroutine context (issue #84
   <https://github.com/nginx-clojure/nginx-clojure/issues/84>)
   5. Enhancement: Auto send error when meets a non websocket request with
   auto_upgrade_wsis on
   6. Enhancement: Add websocket-upgrade! to server channel API
   7. Enhancement: Add WholeMessageAdapter to make handling small websocket
   messages easier.
   8. Bug Fix: NginxHttpServerChannel.write(ByteBuffer buf) does not reset
   the buffer's position (issue #83
   <https://github.com/nginx-clojure/nginx-clojure/issues/83>)
   9. Bug Fix: No access to tomcat server 8.24 from nginx-clojure (issue #82
   <https://github.com/nginx-clojure/nginx-clojure/issues/82>)
   10. Binaries Distribution: Including some java sources for easy debug.
   11. Build Script: Autodetect JNI header files


Below are some simple examples about embedding Nginx-Clojure and we can try
them with  lein repl or debug them in a Java IDE.

[nginx-clojure/nginx-clojure-embed "0.4.1"]


For Clojure

    ;;(1) Start it with ring handler and an options map
    ;;my-app can be a simple ring hanler or a compojure router.
    (run-server my-app {:port 8080})


   ;;(2) Start it with a nginx.conf file
    (run-server "/my-dir/nginx.conf")

   ;;(3) Start it with a given work dir
    (binding [*nginx-work-dir* my-work-dir]
      (run-server ...))

   ;;(4) Stop the server
    (stop-server)

For Java

//Start it with ring handler and an options
mapNginxEmbedServer.getServer().start("my.HelloHandler",
ArrayMap.create("port", "8081"));

//Start it with with a nginx.conf
fileNginxEmbedServer.getServer().start("/my-dir/nginx.conf");
//Start it with a given work
dirNginxEmbedServer.getServer().setWorkDir(my-work-dir);NginxEmbedServer.getServer().start(...);

//Stop the serverNginxEmbedServer.getServer().stop();

default options:

          "error-log", "logs/error.log",
          "max-connections", "1024",
          "access-log", "off",
          "keepalive-timeout", "65",
          "max-threads", "8",
          "host", "0.0.0.0",
          "port", "8080",


There 's an example about compojure routing and websocket example in the
unit tests source
<https://github.com/nginx-clojure/nginx-clojure/blob/master/nginx-clojure-embed/test/clojure/nginx/clojure/test_embed.clj>
:


Web Site   http://nginx-clojure.github.io/
Source Hosted on Github https://github.com/nginx-clojure/nginx-clojure
Google Group (mailing list)
https://groups.google.com/forum/#!forum/nginx-clojure

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to