Fork me on GitHub
#shadow-cljs
<
2021-01-25
>
thheller09:01:57

@ajsnow2012 there is no such thing as deploying a "shadow app as a jar". the output shadow-cljs produces is javascript which no presumption about which server you are going to use. shadow-cljs itself is never part of the server and shouldn't be. its job is just building the output and staying out of your production environment completely.

thheller09:01:57

so anything that is capable of serving static files is fine. I don't know heroku but I'd assume there is something to do that

thheller09:01:31

I personally just build stuff locally and then copy the output to a static webserver

thheller09:01:04

of course if you need anything server-side you can do that as well but shadow-cljs doesn't handle those parts. I use lein for that.

Ian Fernandez10:01:35

some of my coworkers got a delay on compiling since from saturday

Ian Fernandez10:01:08

and now when he tries to open the application, it never loads, only in incognito mode

Ian Fernandez10:01:19

anyone here had some issue like this?

Ian Fernandez10:01:37

I don't understand why he is having this issue

thheller10:01:45

sounds like a cache issue? maybe a service worker?

Ian Fernandez10:01:28

he deleted npm_modules/, .shadow-cljs/

Ian Fernandez10:01:34

and installed it again

Ian Fernandez10:01:50

but it not worked

Ian Fernandez10:01:03

any thoughts on debugging this?

Ian Fernandez10:01:13

in "normal mode" he is having a 304

Ian Fernandez10:01:26

and in "incognito mode" he is having 200

thheller10:01:27

sounds like a cache issue? maybe a service worker?

Ian Fernandez10:01:44

he does not have a cache in the browser

Ian Fernandez10:01:01

i don't know how to debug a "service worker" sorry

thheller10:01:09

first confirm that non is active

thheller10:01:40

in chrome devtools under Application

thheller10:01:43

304 is something the server sends so make sure you are using the correct server. it is not something the client can produce without a service worker.

thheller10:01:50

might be browser extension also

thheller10:01:01

304 is fine but it does point to a cache issue

thheller10:01:15

so maybe there is some old bad html cached somehow

thheller10:01:34

I don't know what your actual issue is so I can't help much

thheller10:01:44

> it never loads

thheller10:01:50

is there an error in the console?

thheller10:01:54

something must happen

Ian Fernandez10:01:25

no, only loads eternally

Ian Fernandez10:01:59

strange that is happening for him and for another coworker but not with me

thheller10:01:44

again. did you verify you are connecting to the correct server?

thheller10:01:54

shut down shadow-cljs completely and open the page again

Ian Fernandez10:01:12

incognito goes well

thheller10:01:58

what server is this?

thheller11:01:31

which shadow-cljs version is this?

Ian Fernandez11:01:11

he cleared the browser and the cache and everything and it went well

Ian Fernandez11:01:33

2.11.14 => shadow-cljs

Ian Fernandez11:01:15

sorry to mess it but thanks anyway @thheller

simongray12:01:00

Having trouble configuring a custom dev-http host. I have been using localhost:7000 so far to access my live-reloading page. I thought I might be able to better separate my different web projects (and their differing SSL requirements) by changing the default dev-http host, so I modified my shadow-cljs.edn to read:

simongray12:01:19

:dev-http {7000 {:root "classpath:public"
                  :host "stucco"}}
rather than

simongray12:01:24

:dev-http {7000 "classpath:public"}

simongray12:01:47

but nothing is available at stucco:7000 . Am I misunderstanding something here? Do I need to configure something else for this to work?

thheller12:01:06

I'm guessing your dns doesn't resolve stucco to localhost

thheller12:01:17

nothing to do with shadow-cljs, it can't configure your dns

thheller12:01:01

:host only does something if your machine has multiple ips so it knows which to pick but since it picks all by default that usually doesn't do anything

thheller12:01:30

on macos I believe you can add stucco 127.0.0.1 so /etc/hosts

thheller12:01:42

then it should be find with :dev-http {7000 "classpath:public"}

thheller12:01:53

or I'm misunderstanding your problem if you already have that

thheller12:01:25

that domain just points all subdomains to localhost by default

simongray13:01:27

@thheller Thank you. That is probably it.