Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Jabis Sevón
/
gun-multiserver
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
a20330fc
authored
2020-05-02 14:03:10 +0700
by
Jabis Sevón
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
gun options
1 parent
062dad5d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
server.js
server.js
View file @
a20330f
...
...
@@ -77,11 +77,11 @@ server.on("upgrade", async function(request, socket, head) {
const
g
=
gun
.
gun
=
Gun
({
peers
:
[],
// should we use self as peer?
localStorage
:
false
,
file
:
false
,
// "tmp/" + pathname,
radisk
:
false
,
store
:
no
,
file
:
"tmp"
+
pathname
,
// make sure not to reuse same storage context
radisk
:
true
,
// important for nomem!
multicast
:
false
,
ws
:
{
noServer
:
true
,
path
:
pathname
,
web
:
gun
.
server
},
web
:
gun
.
server
ws
:
{
noServer
:
true
,
path
:
pathname
}
});
gun
.
server
=
gun
.
gun
.
back
(
'opt.ws.web'
);
// this is the websocket server
lru
.
set
(
pathname
,
gun
);
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment