1require('dotenv').config();
2
3const express = require('express');
4const server = express();
5const cors = require('cors');
6const ejs = require('ejs');
7const methodOverride = require('method-override');
8const pg = require('pg');
9const agent = require('superagent');
10
11const client = new pg.Client(process.env.DATABASE_URL);
12
13server.use(methodOverride('_method'));
14server.use(express.static('./public'));
15server.use(cors());
16server.use(express.urlencoded({extended :true}));
17server.set('view engine','ejs');