fix: to deploy

This commit is contained in:
cudr 2019-10-28 19:56:12 +03:00
parent dc65376a37
commit a805d2476a

View File

@ -2,12 +2,12 @@ const Connection = require('@slate-collaborative/backend')
const defaultValue = require('./src/defaultValue') const defaultValue = require('./src/defaultValue')
const express = require('express') const express = require('express')
const app = express()
const server = require('http').createServer(app)
const PORT = process.env.PORT || 9000 const PORT = process.env.PORT || 9000
const server = express()
.use(express.static('build'))
.listen(PORT, () => console.log(`Listening on ${PORT}`))
const config = { const config = {
entry: server, // or specify port to start io server entry: server, // or specify port to start io server
defaultValue, defaultValue,
@ -26,7 +26,3 @@ const config = {
} }
const connection = new Connection(config) const connection = new Connection(config)
app.use(express.static('build'))
server.listen(PORT)