pandeiro / boot-http

A simple HTTP serve task for the Boot build tool
62 stars 34 forks source link

Question: How to use from Windows? #41

Closed laforge49 closed 8 years ago

laforge49 commented 8 years ago

As a windows user, with boot-jetty I just set init-parms like this:

(serve :init-params {"org.eclipse.jetty.servlet.Default.useFileMappedBuffer" "false"})

But with boot-http, I need to provide a function to :init. So how do I write that function?

Thanks!

laforge49 commented 8 years ago

First, create another namespace to set the parameter in:

(ns duracell.strap)

(defn jetty-init [] (.put (System/getProperties) "org.eclipse.jetty.servlet.Default.useFileMappedBuffer" "false") )

Then add :init to serve in build.boot:

(serve :port 8000
       :init 'duracell.strap/jetty-init)