aboutsummaryrefslogtreecommitdiffstats
path: root/index.js
blob: cf59d6d3b13b8ac730a8c26ad9dee5da2c71a3bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const express = require('express');
const path = require('path');
const members = require('./Members.js');

const app = express();

// Gets all members
app.get('/api/members', (req, res) => res.json(members));


// Set static directory
app.use(express.static(path.join(__dirname, 'public')));

const PORT = process.env.PORT || 3000;

app.listen(PORT, () => console.log(`Server started on port ${PORT}`));