Last active
December 19, 2018 05:45
-
-
Save alexpermiakov/b03f5145b561936558c77495fd003283 to your computer and use it in GitHub Desktop.
Middleware enabled
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
import http from "http"; | |
import express from "express"; | |
import { applyMiddleware } from "./utils"; | |
import middleware from "./middleware"; | |
const router = express(); | |
applyMiddleware(middleware, router); | |
const { PORT = 3000 } = process.env; | |
const server = http.createServer(router); | |
server.listen(PORT, () => | |
console.log(`Server is running http://localhost:${PORT}...`) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment