bhauman / lein-figwheel

Figwheel builds your ClojureScript code and hot loads it into the browser as you are coding!
Eclipse Public License 1.0
2.88k stars 210 forks source link

Unable to change Figwheel server-port #744

Open zendevil opened 4 years ago

zendevil commented 4 years ago

I am changing the server port of Figwheel like so:

{:builds [
                                           {:id           "ios"
                                            :source-paths ["src" "env/dev"]
                                            :figwheel     {:server-port 3450}
                                            :compiler     etc..
                                  } etc...]

But this gives me the error:

The key :server-port at (:all-builds 0 :figwheel) is on the wrong path.

  {:all-builds
   [{:figwheel
     {:server-port 3450
      ^---- The key :server-port has been misplaced
      }}]}

The :server-port key should probably be placed like so: 

  {:figwheel-options
   {:server-port 3450
    ^---- The key :server-port should probably be placed here
    }}

What am I doing wrong?

mengu commented 4 years ago

@zendevil, i don't know your figwheel version but you should define :figwheel as a key under the defproject declaration.


(defproject myproject "0.1.0"
  ;; some definitions here
  :figwheel { 
    :server-port 3450
    :css-dirs "resources/public/css"
    :ring-handler some.nice/handler }
 ;; rest of the definitions
)