-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.js
22 lines (17 loc) · 860 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
'use strict';
const express = require('express.co');
const app = express();
require('dotenv').config();
/*
|----------------------------------------------------------------------------------------------------------------------
| Routes
|----------------------------------------------------------------------------------------------------------------------
*/
app.get('/fetch/:source', require('./controllers/base'));
app.get('*', (req, res) => res.json({error: 'Invalid route'}));
/*
|----------------------------------------------------------------------------------------------------------------------
| Listen
|----------------------------------------------------------------------------------------------------------------------
*/
app.listen(process.env.PORT, () => console.log('Application running on http://localhost:' + process.env.PORT));