Commit Graph

87 Commits

Author SHA1 Message Date
Jesse Gibson
ddf272bbb0 Allow greeting messages to be opt-out
If you use gun a bunch, you've probably noticed the messages like "Hello
wonderful person :)" and "WARNING: This file.js module...".
This PR allows you to silence them.
Use `Gun.log.off = true` to bring peace back to your workflow.
> **Note:** great when used with file watchers like nodemon."
2016-11-14 17:00:06 -07:00
Jesse Gibson
406276739a Merge pull request #268 from PsychoLlama/allow-file-json-opt-out
Allow opting out of file.json
2016-11-14 16:39:24 -07:00
Jesse Gibson
3e66aff985 Allow opting out of file.json
If the most recent gun options disable the file module, then it
won't try to read/write from the json. Previously it would. Also, now
you can override the behavior by passing `{ file: false }` as the
options in `gun.put`.
2016-11-14 16:31:45 -07:00
Jesse Gibson
ba43dcac17 Add server push
Pushes graph updates to connected clients, listening for
acknowledgements.
2016-11-14 13:40:55 -07:00
Jesse Gibson
e8194887e0 Add basic server get handling
Servers now dispatch requests to clients and listen for responses,
plugging them into gun.
2016-11-11 17:48:56 -07:00
Jesse Gibson
4cd2d434d1 Add websocket backoff/retry logic
New library handles websocket reconnection logic and queues messages
that were sent while offline.
2016-11-10 10:11:01 -07:00
Jesse Gibson
e36e78f532 Isolate websocket logic
WebSocket logic has it's own folder now, `wsp`.
2016-11-10 10:09:18 -07:00
Jesse Gibson
adbea08120 Add basic websocket logic
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.
2016-10-26 14:52:28 -06:00
Jesse Gibson
6f8c99ccf1 Fix /gun.js route
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.
2016-10-18 13:54:59 -06:00
Allain Lalonde
81a48ff272 \r\n was incorrectly getting replaced with \r, which mangled things 2016-10-05 15:43:37 -04:00
d3x0r
a472f33e66 Check request for 'upgrade' being set
along with the path check, should check that the request is an upgrade before assuming to do anything with it really.
2016-09-30 16:54:06 -07:00
devel-pa
9098380a90 Put out of the way require polyfill. 2016-09-30 21:24:01 +02:00
devel-pa
b8025b207f Unbuilding structure. 2016-09-30 21:19:18 +02:00
Mark Nadal
347ac0ff37 Update wsp.js 2016-09-26 22:50:35 -07:00
Mark Nadal
2ce6c80521 fix crashing bug found by @d3x0r 2016-09-25 18:09:28 -07:00
Mark Nadal
cdbf06e9c4 pretty print data.json for @d3x0r 2016-09-25 13:41:14 -07:00
Mark Nadal
fa3d3eeff4 0.5 BETA TESTING 2016-09-25 13:06:29 -07:00
Mark Nadal
97449e9f28 into the meat of put 2016-08-03 16:58:15 -07:00
Mark Nadal
afc1c18304 significant internal refactor 2016-07-14 19:37:19 -07:00
Mark Nadal
b369d37731 bring opt updates in from master 2016-07-07 11:49:30 -07:00
Mark Nadal
ac761bf674 re-organize, add panic 2016-06-01 08:35:55 -07:00
Mark Nadal
08418ee836 realtime sync with 40 tests passing 2016-05-26 11:40:09 -07:00
Mark Nadal
3ff91ec42c add more tests 2016-05-25 14:26:29 -07:00
Mark Nadal
1fdd9cf89a 20% tests passing! Before testing server. 2016-05-25 13:11:06 -07:00
Mark Nadal
0f01d06975 25M+ ops/sec !!!!! 2016-05-10 17:08:33 -07:00
Mark Nadal
2d3572fe82 oye 2016-02-29 23:18:22 -08:00
Mark Nadal
cae7db93f5 dem refactor 2016-02-26 12:15:24 -08:00
Mark Nadal
7883bad67d oye 2016-02-15 13:56:23 -08:00
Mark Nadal
0acdb4e137 mid-sentence 2016-02-11 19:46:16 -08:00
Mark Nadal
4631200115 refinements on structuring 2016-02-11 08:11:37 -08:00
Mark Nadal
cec7e10133 Streaming demo
Major changes for the streaming demo, pushing to GitHub
2016-02-09 16:30:47 -08:00
Mark Nadal
c8fe8ae00c SPAM 2016-02-03 12:07:41 -08:00
Mark Nadal
a1bc9a27f2 switch to real work 2016-02-01 13:47:42 -08:00
Mark Nadal
c03b7d4e1e match update 2016-01-30 15:14:33 -08:00
Mark Nadal
7f44bed3d9 quick express fixes 2016-01-28 13:00:38 -08:00
Mark Nadal
93bf37b94d Merge branch 'master' into develop
# Conflicts:
#	README.md
#	gun.js
2016-01-26 12:59:10 -08:00
Mark Nadal
ce6ce34dce readme update 2016-01-26 12:41:29 -08:00
Mark Nadal
73aae8edf0 Update wsp.js 2016-01-11 16:13:17 -08:00
Mark Nadal
8f24dc9e2f Update wsp.js 2016-01-04 16:26:55 -08:00
Mark Nadal
59f20c2cbd couple fixes 2015-12-30 14:51:15 -08:00
Mark Nadal
8c0dae0176 server updated 2015-12-26 21:14:14 -08:00
Mark Nadal
ab138b5350 BREAKING 0.3 ONLY CORE MEMORY WORKS!
# Conflicts:
#	lib/file.js
2015-12-23 18:12:01 -08:00
Mark Nadal
6d15aa1e61 API 0.3 BREAKING CHANGES, TESTS PASSING 2015-12-22 01:56:41 -08:00
Thomas Kalka
61ded1b337 ws 2015-11-19 10:03:05 +01:00
Thomas Kalka
690eb4c81a do queueing right 2015-11-19 09:54:09 +01:00
Thomas Kalka
0489b3d634 fix concurrent writes and remember known nodes 2015-11-18 03:00:47 +01:00
Mark Nadal
b36d6f5247 move put's back.emit to the bottom for improved perf. 2015-11-09 19:07:08 -08:00
Mark Nadal
13b8ff9ada val end fix & comments 2015-10-23 07:08:11 -07:00
Mark Nadal
4b41d04ada fix live replication bug depending on ordering 2015-10-16 16:01:23 -07:00
Mark Nadal
2c80ae81e9 path bug fixes & NTS 2015-10-15 16:34:30 -07:00