9 lines
269 B
JavaScript
9 lines
269 B
JavaScript
import {createServer} from "http";
|
|
import {Server} from "socket.io";
|
|
|
|
const options = {}
|
|
if( process.env.DEXORDER_CORS )
|
|
options['cors'] = {origin:process.env.DEXORDER_CORS}
|
|
export const httpServer = createServer()
|
|
export const io = new Server(httpServer, options)
|