Skip to content

Instantly share code, notes, and snippets.

@vsavkin
Created August 8, 2019 17:31
Show Gist options
  • Save vsavkin/9fa9c4f5483527d8b5d52f8e7ab2f3ac to your computer and use it in GitHub Desktop.
Save vsavkin/9fa9c4f5483527d8b5d52f8e7ab2f3ac to your computer and use it in GitHub Desktop.
/**
* 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