Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

https://stateb.us:3006/ Never Sends Data #53

Open
gchartier opened this issue Apr 9, 2023 · 1 comment

Comments

@gchartier
Copy link

gchartier commented Apr 9, 2023

Tried opening the example code from the tutorial as an html file in my browser but the cosnsole says: [ ] trying to open https://stateb.us:3006.

I opened that url in another tab and it seems to infinitely load and never return data.

Tried in Brave browser and Firefox Developer Edition with the same result.

@toomim
Copy link
Member

toomim commented Apr 9, 2023

I just tried it and it's working for me. I pasted this code:

<script type="coffee">
dom.BODY = ->
  size = if state.big then 300 else 50
  DIV
    width: size
    height: size
    padding: 20
    backgroundColor: 'lightgrey'
    onClick: => state.big = !state.big
    'Click me!'
</script><script src="https://stateb.us/client6.js"></script>

Into a file.html on my computer, and opened it in chrome and safari, and it worked in both.

The message [ ] trying to open ... appears when it's trying to open a websocket. If it completes and opens a websocket, it will tell you like this:

image

It's possible that your network is blocking port 3006. If that's true, you can try connecting to a different server, with e.g.:

<script src="https://stateb.us/client6.js" server="http://localhost/"></script>

but I suspect you'd probably rather just turn off the server entirely. For that, just use:

</script><script src="https://stateb.us/client6.js" server=none ></script>

I apologize for this confusion. I made a bad design decision in the current version (6) by loading a default server at https://stateb.us:3006. The next version (7) does not connect to a server until you ask it to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants