mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-20 07:05:05 -04:00
Version 2 initial commit
This commit is contained in:
parent
81252d301c
commit
663db5cbb3
99 changed files with 2448 additions and 27650 deletions
23
index.js
23
index.js
|
@ -1,23 +0,0 @@
|
|||
'use strict';
|
||||
var express = require('express');
|
||||
var compression = require('compression');
|
||||
var app = express();
|
||||
var http = require('http');
|
||||
var ExpressPeerServer = require('peer').ExpressPeerServer;
|
||||
var wsServer = require('./server/ws-server.js');
|
||||
|
||||
var server = http.createServer(app);
|
||||
|
||||
// Serve up content from public directory
|
||||
app.use(compression());
|
||||
app.use(express.static(__dirname + '/public'));
|
||||
|
||||
var port = process.env.PORT || 3002;
|
||||
server.listen(port);
|
||||
wsServer.create(server);
|
||||
app.use('/peerjs', ExpressPeerServer(server, {
|
||||
debug: true
|
||||
}));
|
||||
|
||||
|
||||
console.log('listening on port ' + port);
|
Loading…
Add table
Add a link
Reference in a new issue