Switch to using file-based storage. Update .gitignore to include db

parent 0b85f529
node_modules
server/localhost.pem
server/localhost-key.pem
unprivileged.db
......@@ -20,7 +20,6 @@ const { pipeline } = require('stream')
const express = require('express')
const expressWebSocket = require('express-ws')
const websocketStream = require('websocket-stream/stream')
const ram = require('random-access-memory')
const hyperdb = require('hyperdb')
const hyperswarm = require('@hyperswarm/network')
......@@ -121,7 +120,7 @@ server.on('connect', (event) => {
}
// Create a new hyperdb with the passed read key and replicate.
const db = hyperdb((filename) => ram(filename), readKey, {
const db = hyperdb('unprivileged.db', readKey, {
createIfMissing: false,
overwrite: false,
valueEncoding: 'json'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment