Created
August 8, 2019 17:31
-
-
Save vsavkin/9fa9c4f5483527d8b5d52f8e7ab2f3ac 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
/** | |
* This is not a production server yet! | |
* This is only a minimal backend to get started. | |
**/ | |
import * as express from 'express'; | |
const app = express(); | |
app.get('/agent', (req, res) => { | |
res.send({ name: 'Agent Name' }); | |
}); | |
const port = process.env.port || 3334; | |
const server = app.listen(port, () => { | |
console.log(`Listening at http://localhost:${port}/agent`); | |
}); | |
server.on('error', console.error); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment