Skip to content

Instantly share code, notes, and snippets.

@niftydevelopment
Created October 12, 2017 20:33
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 niftydevelopment/60ff2cb8d0ce5c418baecb191caf41fa to your computer and use it in GitHub Desktop.
Save niftydevelopment/60ff2cb8d0ce5c418baecb191caf41fa to your computer and use it in GitHub Desktop.
const express = require('express')
const fs = require('fs');
const Promise = new require('promise');
exports.bootup = (mutateDataStuf) => {
return new Promise((resolve) => {
const app = express()
app.get('/foo', function (req, res) {
res.send(mutateDataStuf);
});
var server = app.listen(3000, function () {
console.log('Mock server listening on port 3000!')
resolve(server);
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment