title: express.js to GET json file in terminal
body: <p>How do I GET a JSON file with express.js?  I want to be able to access it in my Mac terminal. I'm working on a college assignment that asks me to write an HTTP server that will act as a simple data store. It must respond to GET, PUT, POST, and DELETE requests. I must use express.js instead of fs for this app. </p>
  
  <p>So far, in my root directory I have a server.js file and I have a subdirectory called lib that holds another subdirectory called notes.  Notes is where the JSON files will live.</p>
  
  <p>In my root directory, I have a server.js file.  This is all I have so far:</p>
  
  <pre><code>'use strict'
  var express = require('express');
  var bodyParser = require('body-parser');
  var app = express();
  var notes = './lib/notes';
  
  app.use(bodyParser.json());
  
  app.get('/', function(req, res) {
    //
    //this is the part I need help with
    //
  }
  
  var port = process.env.PORT || 3000;
  app.listen(port, function() {
    console.log('Server started on port ' + port;
  });
  </code></pre>
  
  <p>Once I have this GET request working, from my Mac terminal I should be able to send a GET request and receive all JSON files inside the notes directory.</p>