Fork me on GitHub
#yada
<
2017-04-08
>
geek-draven14:04:45

I've finally got my app running from a jar, but I've been pulling my hair out on the deployment now. I used the config file that came with Edge and also most of the startup code, but when I run it locally everything works, but as soon as I put it on a server and connect to it, I just get a screen saying 'Not Found' and the host name - anyone know what I'm doing wrong?

malcolmsparks14:04:45

Look at the resources/config.edn file. Set up the :prod profile according to your hostnames

geek-draven14:04:10

@malcolmsparks I'm starting to think it might be something on the server end as the prod details contain the correct hostname and I used the same port number. The message only appears if I run the jar, so something is happening

malcolmsparks14:04:27

What's the port number? Are you using nginx?

malcolmsparks14:04:58

Host should include port if not 80/443. E.g. http://example.com:8080

malcolmsparks15:04:17

404 indicates the host/port isn'

geek-draven15:04:35

I was using port 3080, but not including it in the host name. I'll try adding it

malcolmsparks16:04:44

Great. The Host header in HTTP has the same semantics. But we'd better document that part better. Edge dev and deployment is going to see some nice improvements soon.

danielcompton19:04:50

@grav did you ever figure out trailing slashes with Yada/bidi?

grav20:04:24

@danielcompton I ended up solving it with nginx. It’s a one-liner there, and it keeps the api cleaner in a sense. Something like rewrite ^/(.+)/$ /$1 permanent;

danielcompton20:04:14

I was printing out the ctx map in my handler and noticed that the :known-methods methods seem to create a new instance every time I reload the page. Is this a correct reading?

danielcompton20:04:59

and is it necessary to create new ones for every request? I'm guessing it is, but just wanted to check