Code Monkey home page Code Monkey logo

Comments (3)

aaronsantiago avatar aaronsantiago commented on June 8, 2024 1

Ah, yes, being able to add a log/breakpoint to wire helped me figure out what's happening. I'm used to opening /gun on public endpoints to see if it's working but that doesn't work in the express setup.

When I was testing, I was mainly testing in a slightly different environment--and critically I was missing this line:
var gun = Gun({ file: 'data', web: server }); which apparently is needed to enable websocket connections.

Thanks for your response!

from gun.

bmatusiak avatar bmatusiak commented on June 8, 2024

i just ran your script.. it does work.

i set PORT to 8282 for me

and opened up http://localhost:8282/gun.js and it served the gun.js

i went ahead and coded a index.html

<script src="./gun.js"></script>
<script>
    var gun = Gun({peers:["http://localhost:8282/gun"]})

    gun.get("hello").get("world").put("ok")
</script>

i added breakpoints into node's-GUN, lib/wire.js (line 70) , it hit the point like it should

, opened up browser and checked to see if the Websocket connects, and inspected the data

everthing works for me


are you still having issues this this?

from gun.

bmatusiak avatar bmatusiak commented on June 8, 2024

233.255.255.255:8765/gun = multicast (its for nodejs to nodejs without setup), you cant set that as a peer..

from gun.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.