Created
December 31, 2019 01:17
-
-
Save treyhuffine/b3e6d25d956ba81bdb8c3cae5e2893fd to your computer and use it in GitHub Desktop.
This file contains hidden or 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 express from 'express'; | |
import { rootHandler, helloHandler } from './handlers'; | |
const app = express(); | |
const port = process.env.PORT || '8000'; | |
app.get('/', rootHandler); | |
app.get('/hello/:name', helloHandler); | |
app.listen(port, err => { | |
if (err) return console.error(err); | |
return console.log(`Server is listening on ${port}`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment