Created
June 10, 2018 12:05
-
-
Save jeshuamaxey/4427c9b895ad4cc0b2830d2405291b75 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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