Open upsiflu opened 1 month ago
Hi! The printed links are only supposed to be HTTPS links if you have passed in an HTTPS custom server. A quick test right now gave me HTTP links, so it looks like Iβm missing something that is different on your computer.
I can reproduce the behaviour as described by @upsiflu when checking out the repository and following the instructions at lab.allmende.io/libernetes/libernet.es.
ghq get https://lab.allmende.io/libernetes/libernet.es
cd ~/src/lab.allmende.io/libernetes/libernet.es
mkdir -p public
asdf plugin add bun
asdf plugin add just
asdf install
bun --bun install
just dev
β
Dependencies
β Chadtech/elm-bool-extra 2.4.2
β elm-community/maybe-extra 5.3.0
β elm/virtual-dom 1.0.3
β elm/parser 1.1.0
β dillonkearns/elm-markdown 7.0.1
β rtfeldman/elm-hex 1.0.0
β elm-community/list-extra 8.7.0
β stoeffel/set-extra 1.2.3
β stil4m/structured-writer 1.0.3
β elm-community/string-extra 4.0.1
β Fresheyeball/elm-return 7.1.0
β linuss/smooth-scroll 1.1.0
β elm-explorations/test 2.2.0
β elm-community/easing-functions 2.0.0
β pablohirafuji/elm-syntax-highlight 3.5.0
β pzp1997/assoc-list 1.0.0
β turboMaCk/non-empty-list-alias 1.4.0
β elm/project-metadata-utils 1.0.2
β miniBill/elm-unicode 1.1.1
β jfmengels/elm-review 2.13.2
β stil4m/elm-syntax 7.3.2
β edkelly303/elm-any-type-forms 5.0.0
β lue-bird/elm-review-single-use-type-vars-end-with-underscore 2.0.3
β upsiflu/less-ui 2.0.0
β
Main 0 ms Q | 68 ms T Β¦ 4 ms W
π server: https://localhost:53205, network: https://10.30.30.9:53205, network: https://100.64.0.7:53205, network: https://172.20.0.1:53205
π web socket connections: 0
β
10:23:34 Compilation finished in 5.99 s.
With just dev
being a shorthand for bun run --bun elm-watch hot
:
$ cat justfile
dev:
cp -R static/* public/
bun run --bun elm-watch hot
β¦
On the contrary to what is printed by the command output, the website will be available on http://localhost:53205/
instead.
Does it happen if you:
just
?node
instead of bun
?Yes!
Using node instead of bun solved the issue:
bun run elm-watch hot
instead of bun run --bun elm-watch hot
Thank you @lydell
Thanks you for narrowing down the problem! Then itβs either a bun bug, or that we need to find some other way of detecting if weβre running an HTTP or HTTPS server. This is the current check: https://github.com/lydell/elm-watch/blob/583ac2df5feec50f0ef6b63421973e5ada2ce9be/src/WebSocketServer.ts#L107
Interesting find. I will be curious to learn what causes the difference with the two upstreams.
When I run
elm-watch hot
, it gives mehttps://
links instead ofhttp://
It's just a minor annoyance. I have to change the URL manually to http://, then it works fine. I didn't find any configuration option to force http://.
Console output (with https instead of http):
elm-watch.json:
public/index.html: