Skip to content

Instantly share code, notes, and snippets.

@WhereJuly
Last active May 9, 2020 07:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WhereJuly/7b275ec75380505aa9db9a384f0e4ab3 to your computer and use it in GitHub Desktop.
Save WhereJuly/7b275ec75380505aa9db9a384f0e4ab3 to your computer and use it in GitHub Desktop.
Basic Express server serving a simplest app with server object exported for tests
'use strict';
const app = require('express')();
app.get('/', (req, res) => {
res.status(200).json({ message: 'Connected!' });
});
// Turn on that server!
const server = app.listen(3000, () => {
console.log('App listening on port 3000');
});
module.exports = server;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment