Last active
March 24, 2022 14:26
-
-
Save agusrichard/60ff0abd3df5eedf9061cd8200d04b7e 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 bodyParser from 'body-parser' | |
import express, { Request, Response } from 'express' | |
const PORT = 3001 | |
const app = express() | |
app.use(bodyParser.json()) | |
app.get('/', (req: Request, res: Response) => { | |
res.send('Hello World') | |
}) | |
app.listen(PORT, () => { | |
console.log(`Server is listening on port ${PORT}`) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment