-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
25 lines (20 loc) · 697 Bytes
/
app.js
File metadata and controls
25 lines (20 loc) · 697 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const express = require("express");
const bodyParser = require("body-parser");
const logger = require("morgan");
const update = require("./bin/flowUpdate");
const userRoutes = require("./routes/userRoutes");
const todoListRoutes = require("./routes/todoListRoutes");
const app = express();
app.use(logger("dev"));
// I wonder if this is breaking the twilio stuff since its trying to get everything to be in
// json instead of xml text
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
userRoutes(app);
todoListRoutes(app);
app.get("*", (req, res) =>
res.status(200).send({
message: "Welcome to the beginning of nothingnes.",
})
);
module.exports = app;