Servers will now try to initiate a connection using websockets if the
`peers` option is set. Currently, it'll either start throwing errors,
or generate a broadcasting storm. Still work to be done...
This marks a milestone of getting the servers to connect to each
other. Now to have those messages make sense. Committing so I
have an easy rollback point.
The `wsp.server` logic was never making it to the /gun.js route. If the
browser is just sending a GET request for a the js file, it won't set
the upgrade property, and the server logic wouldn't let the request pass
if it didn't have that header.
I've simply moved the check below the file serving logic.
Sometimes you just wanna send data to only one client, not the whole
bunch. Now, with new advances in gun technology, you can disable the
default broadcasting behavior.
Feature implemented under the direction and guidance of @amark.
Since the file.js module is only for development or getting started, we
shouldn't have to minify the data before persisting it. In fact, it may
hurt things, since it obfuscates our data structure and makes it harder
to understand what's going on under the hood.
In this commit, I swapped `Gun.text.ify` with JSON's `stringify` and
gave it a 2-space formatting option to make the data more readable.
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.