Created
August 28, 2019 12:15
-
-
Save tsh-code/8b4da2ca06ba1ae288ee74d78b44cb26 to your computer and use it in GitHub Desktop.
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
const express = require('express') | |
const app = express() | |
const port = 3055 | |
app.get('/async', async (req, res) => { | |
const user = await readUserAsync() | |
res.send(user) | |
}) | |
app.get('/sync', (req, res) => { | |
const user = readUserSync() | |
res.send(user) | |
}) | |
app.listen(port, () => console.log(`Example app listening on port ${port}!`)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment