mirror of
https://github.com/darkwire/darkwire.io.git
synced 2025-07-18 10:49:02 +00:00
Merge branch 'master' into revert-to-hmac
This commit is contained in:
commit
27ae0a4fbf
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
node_modules
|
node_modules
|
||||||
src/public/main.js
|
src/public/main.js
|
||||||
|
src/.secret
|
||||||
|
@ -8,6 +8,8 @@ Simple encrypted web chat. Powered by [socket.io](http://socket.io) and the [web
|
|||||||
npm install
|
npm install
|
||||||
gulp start
|
gulp start
|
||||||
|
|
||||||
|
Create a **.secret** file in **/src** folder with a your session secret. It doesn't matter what it is- just keep it private.
|
||||||
|
|
||||||
Darkwire is now running on `http://localhost:3000`
|
Darkwire is now running on `http://localhost:3000`
|
||||||
|
|
||||||
### Deployment
|
### Deployment
|
||||||
|
@ -9,6 +9,7 @@ import _ from 'underscore';
|
|||||||
import Room from './room';
|
import Room from './room';
|
||||||
import favicon from 'serve-favicon';
|
import favicon from 'serve-favicon';
|
||||||
import compression from 'compression';
|
import compression from 'compression';
|
||||||
|
import fs from 'fs';
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
const server = http.createServer(app);
|
const server = http.createServer(app);
|
||||||
@ -20,7 +21,7 @@ const sessionMiddleware = session({
|
|||||||
port: 6379,
|
port: 6379,
|
||||||
db: 2
|
db: 2
|
||||||
}),
|
}),
|
||||||
secret: 'hay',
|
secret: fs.readFileSync(__dirname + '/.secret', 'UTF-8'),
|
||||||
resave: true,
|
resave: true,
|
||||||
saveUninitialized: true
|
saveUninitialized: true
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user