unpkg/modules/server.js

13 lines
313 B
JavaScript
Raw Normal View History

2019-08-03 00:07:17 +00:00
if (process.env.GAE_ENV === 'standard') {
require('@google-cloud/trace-agent').start();
}
2019-07-10 00:21:25 +00:00
import createServer from './createServer.js';
2019-07-10 00:21:25 +00:00
const server = createServer();
const port = process.env.PORT || '8080';
2019-07-10 00:21:25 +00:00
server.listen(port, () => {
console.log('Server listening on port %s, Ctrl+C to quit', port);
});