aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--index.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/index.js b/index.js
index ae9d9d0..13d321c 100644
--- a/index.js
+++ b/index.js
@@ -3,6 +3,31 @@ const path = require('path');
const app = express();
+const members = [
+ {
+ id: 1,
+ name: 'Garth Brooks',
+ email: 'garth.brooks@gmail.com',
+ status: 'active'
+ },
+ {
+ id: 2,
+ name: 'Bob Evans',
+ email: 'bob.evans@gmail.com',
+ status: 'inactive'
+ },
+ {
+ id: 3,
+ name: 'Alan Jackson',
+ email: 'alan.jackson@gmail.com',
+ status: 'active'
+ }
+];
+
+// Gets all members
+app.get('/api/members', (req, res) => res.json(members));
+
+
// Set static directory
app.use(express.static(path.join(__dirname, 'public')));