-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver.js
26 lines (17 loc) · 801 Bytes
/
server.js
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
26
require('dotenv').config()
const express = require('express')
const app = express()
const mongoose = require('mongoose')
mongoose.connect(process.env.DATABASE_URL, { useNewUrlParser: true })
const db = mongoose.connection
db.on('connected', () => console.log('Connected to database'));
db.on('error', (error) => console.error(error))
db.once('open', () => console.log('Connected to Database'))
app.use(express.json())
const subscribersRouter = require('./routes/subscribers');
// const salesforceAuthRouter = require('./routes/salesforceAuth');
const vipAuthRouter = require('./routes/vipAuth');
// app.use('/subscribers', subscribersRouter);
// app.use('/salesforceAuth', salesforceAuthRouter);
app.use('/salesforceAuth', vipAuthRouter);
app.listen(3000, () => console.log('Server Started'))