Skip to content

Instantly share code, notes, and snippets.

@jeshuamaxey
Created June 10, 2018 12:05
Show Gist options
  • Save jeshuamaxey/4427c9b895ad4cc0b2830d2405291b75 to your computer and use it in GitHub Desktop.
Save jeshuamaxey/4427c9b895ad4cc0b2830d2405291b75 to your computer and use it in GitHub Desktop.
const express = require('express');
const bodyParser = require('body-parser');
const morgan = require('morgan')
const cloudFunctions = require('./cloud-functions');
const PORT = 3000;
const app = express();
app.use(bodyParser.urlencoded({ extended: false }));
app.use(morgan('combined'));
app.get('/', (req, res) => {
res.send('hello world!');
});
app.post('/message-received', cloudFunctions.emailRiskScores);
app.listen(PORT, (req, res) => {
console.log(`app available at http://localhost:${PORT}`);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment