1'use strict';
2// Application dependencies
3const express = require('express');
4const cors = require('cors');
5const superagent = require('superagent');
6const pg = require('pg');
7const methodOverride = require('method-override');
8
9// Application setup
10require('dotenv').config();
11const app = express();
12const PORT = process.env.PORT || 3000;
13const client = new pg.Client(process.env.DATABASE_URL);
14app.use(cors());
15
16app.use(express.urlencoded({extended: true}));
17 app.set('view engine', 'ejs')
18
19app.use(methodOverride('_method'))