Skip to content

Instantly share code, notes, and snippets.

@iamfunsho iamfunsho/block7.js Secret
Created Oct 24, 2017

Embed
What would you like to do?
"use strict";
import express from "express";
import bodyParser from "body-parser";
import socket from "socket.io";
import path from "path";
import env from "node-env-file";
import { client } from "../lib/redis";
import * as routes from "./routes";
env(".env");
const PORT = process.env.APP_PORT;
const app = express();
// view engine setup
app.set("views", path.join(__dirname, "../public/views"));
app.set("view engine", "pug");
// static files folder setup
app.use(express.static(path.join(__dirname, "../public/assets")));
// Middleware to parse request body
app.use(
bodyParser.urlencoded({
extended: true
})
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.