Closed prikhi closed 8 years ago
@prikhi Give me a few hours I believe this had been fixed in a certain PR. I shall look into it.
Sweet, thank you :)
OK update time, I grabbed the wai-devel
source and ran stack install
and file resolution seems to work fine. Previously I had used stack to install wai-devel(stack install wai-devel
). I don't know much about stack, but you might want to patch or bump the version that's available on there.
It's now able to find the file/function I specify via CLI flags, but it seems to be running my program twice, & throwing an error when it tries to serve the application on the port it's already using:
$ wai-devel -p src/Main.hs -f main
Starting devel application at http://localhost:3000
UpdateStatusRequiredRestart
UpdateStatusProgress [1 of 8] Compiling Types
UpdateStatusProgress [2 of 8] Compiling Models.Base
UpdateStatusProgress [3 of 8] Compiling Utils
UpdateStatusProgress [4 of 8] Compiling Import
UpdateStatusProgress [5 of 8] Compiling Handlers.Categories
UpdateStatusProgress [6 of 8] Compiling Handlers.Products
UpdateStatusProgress [7 of 8] Compiling App
UpdateStatusProgress [8 of 8] Compiling Main
UpdateStatusDone
Spock is running on port 3000
Run result: RunProgException "IOException: bind: resource busy (Address already in use)"
Checking netstat -tulpn
:
$ sudo netstat -tulpn | grep 3000
tcp 0 0 0.0.0.0:3000 0.0.0.0:* LISTEN 10881/wai-devel
Maybe my code in main
is off? It lives here:
https://github.com/Southern-Exposure-Seed-Exchange/Order-Manager-Prototypes/blob/master/spock/src/Main.hs
Oops, I forgot about the reverse proxy. Disabling that fixes my previous issue. I didn't get how to tell wai-devel which port to proxy.
Yeah let me bump up the version on Stackage. There was some updated code there. Sorry, I just have no time.
Version bump though the code needs serious maintenance.
This was fixed, closing.
I'm getting this error when running wai-devel in my Spock project:
My app file is
src/Main.hs
, with a function nameddevelMain
.