Just keeping things organized by enabling all of our dependencies up
at the top of the file.
const app = express();
app.use(cors());
const app = express();
app.use(cors());
+app.use(body_parser.urlencoded({ extended: false }));
+app.use(body_parser.json());
const GameState = {
JOIN: 1,
const GameState = {
JOIN: 1,
-app.use(body_parser.urlencoded({ extended: false }));
-app.use(body_parser.json());
-
function handle_events(request, response) {
const game = request.game;
/* These headers will keep the connection open so we can stream events. */
function handle_events(request, response) {
const game = request.game;
/* These headers will keep the connection open so we can stream events. */