Last active
December 12, 2018 17:10
-
-
Save alexpermiakov/9c4115ea57df7fd0d86a0a2a1a39cc13 to your computer and use it in GitHub Desktop.
Basic http server with express
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"; | |
const router = express(); | |
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