Closed msbeck closed 6 years ago
Have you also started the webserver (npm start, or something like that) in a third window?
I normally have 4-5 terminal windows open with:
lein repl
-- The backend with game logiclein cljsbuild auto dev
(or replaced with lein figwheel
) -- compiling the frontend cljs to jsmongod
-- Card databasestylus ...
-- compiling the frontend sty to cssnpm start ...
-- running the backend webserver and communicating between game logic and client web stuffI'm working out of nrdev using vagrant boxes and I think some of those things are automatically started when I start the vagrant box.
I can navigate around the main site on localhost:1042 as well as create and enter/play games, so I'm assuming the webserver is running.
Terminal 1
$vagrant up
...
$lein repl
...
game.main=> (future-call dev)
Terminal 2
$ npm run start
> netrunner@0.0.1 start /vagrant/netrunner
> coffee server.coffee
Dev environment
Error: listen EADDRINUSE 0.0.0.0:1042
at Object._errnoException (util.js:1022:11)
at _exceptionWithHostPort (util.js:1044:20)
at Server.setupListenHandle [as _listen2] (net.js:1351:14)
at listenInCluster (net.js:1392:12)
at doListen (net.js:1501:7)
at _combinedTickCallback (internal/process/next_tick.js:141:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:686:11)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3
App version 0.1.0
EADDRINUSE means that some other process is bound to the port 1042 already. Make sure there isn't another instance of Node running.
That wouldn't be the server itself I'm running with lein repl would it?
On Feb 14, 2018 5:14 PM, "Neal Terrell" notifications@github.com wrote:
EADDRINUSE means that some other process is bound to the port 1042 already. Make sure there isn't another instance of Node running.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mtgred/netrunner/issues/3083#issuecomment-365776884, or mute the thread https://github.com/notifications/unsubscribe-auth/AC2B-wYCEZxkTzkd5G6QSBdcnMz0DmK1ks5tU2jqgaJpZM4SFskA .
No, the game logic (clojure) server runs on a different port.
Hi @msbeck, I just merged a complete server rewrite into the master branch. Try pulling that. You can then do what your first comment suggests: lein figwheel
to compile the UI files, then lein repl
to launch the server -- that's it.
Does lein figwheel auto compile and push the files live if I'm editing them while running the server?
What's the # of that merge? I saw that a server rewrite was in progress. Good to hear it's complete.
https://github.com/mtgred/netrunner/pull/2915
Yes, figwheel auto-compiles changes to CLJS and serves them to the active browser page.
I updated the version of Figwheel in #3342 It helped with the connection issues I was having, though Figwheel is still hella flaky for me.
I run
lein repl
then do a(future-call dev)
in one terminal. Once that's started I runlein figwheel
in another. The following results, but the prompt never appears.I've tried closing and re-opening the browser clients and restarting things a few times. I've never ran an application like this before. Am I missing something?