Last active
August 22, 2018 16:21
-
-
Save davidsaccavino/c6c956d02c9679457d2a0e5dae4ac711 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const express = require('express'); | |
// const socket = require('socket.io'); | |
const path = require('path'); | |
const PORT = process.env.PORT || 3001; | |
const INDEX = path.join(__dirname, '/build/index.html'); | |
const server = express() | |
.use((req, res) => res.sendFile(INDEX) ) | |
.listen(PORT, () => console.log(`Listening on ${ PORT }`)); | |
// const io = socket(server); | |
// io.on('connection', (socket) => { | |
// console.log('Client connected'); | |
// socket.emit('hello'); | |
// socket.on('disconnect', () => console.log('Client disconnected')); | |
// }); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment