-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
21 lines (17 loc) · 644 Bytes
/
app.js
File metadata and controls
21 lines (17 loc) · 644 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// These are the Node.js modules used for this Express app.
// They are installed using NPM
var express = require('express');
var cors = require('cors');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
// This creates the Express app which is configured below.
var app = express();
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(cors());
app.use('/api', require('./api'));
// Important later! This exports the app object as a module.
// This comes into play when we deploy the application to
// Cloud Functions.
module.exports = app;