-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.js
More file actions
23 lines (19 loc) · 831 Bytes
/
server.js
File metadata and controls
23 lines (19 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
var path = require('path');
var express = require('express');
var app = express();
var http = require('http').Server(app);
// Serve static files
//Configure App
app.use('/', express.static(path.join(__dirname)));
// app.use('/jiff', express.static(path.join(__dirname, 'node_modules', 'jiff-mpc', 'dist')));
// app.use('/jiff/ext', express.static(path.join(__dirname, 'node_modules', 'jiff-mpc', 'lib', 'ext')));
const { JIFFServer, JIFFServerBigNumber } = require('jiff-mpc');
const jiffServer = new JIFFServer(http, { logs: true });
jiffServer.apply_extension(JIFFServerBigNumber);
// Serve static files.
http.listen(8080, function () {
console.log('listening on *:8080');
});
console.log('Direct your browser to http://localhost:8080/.');
console.log('To run a node.js based party: node party.js <input>');
console.log();