title: Node.js -- Undefined:0 Syntax Error: Unexpected end of input
body: <p>Just getting my feet wet with Node.js and Backbone.js. I'm using the book "Backbone Blueprints" and some of the code he provides to set up the webserver appears to not work. </p>
  
  <p>I have Node.js installed and running (I know this works). His package.json code seemed to do the trick, but I'll post it below just in case:</p>
  
  <pre><code>{
    "name": "simple-blog",
    "description": "This is a simple blog.",
    "version": "0.1.0",
    "scripts": {
      "start": "nodemon server.js"
    },
    "dependencies": {
      "express": "3.x.x",
      "ejs": "~0.8.4",
      "bourne": "0.3"
    },
    "devDependencies": {
      "nodemon": "latest"
    }
  }
  </code></pre>
  
  <p>This is the server.js code that errors out when I try to turn on the server:</p>
  
  <pre><code>var express = require('express');
  var path = require('path');
  var Bourne = require("bourne");
  
  var app = express();
  var posts = new Bourne("simpleBlogPosts.json");
  var comments = new Bourne("simpleBlogComments.json");
  
  app.configure(function(){
      app.use(express.json());
      app.use(express.static(path.join(__dirname, 'public')));
  });
  
  app.get('/*', function (req, res) {
      res.render("index.ejs");
  });
  
  app.listen(3000);
  </code></pre>
  
  <p>Full error:</p>
  
  <pre><code>&gt; nodemon server.js
  
  11 Mar 19:35:22 - [nodemon] v1.3.7
  11 Mar 19:35:22 - [nodemon] to restart at any time, enter `rs`
  11 Mar 19:35:22 - [nodemon] watching: *.*
  11 Mar 19:35:22 - [nodemon] starting `node server.js`
  undefined:0
  
  ^
  SyntaxError: Unexpected end of input
      at Object.parse (native)
      at new Bourne (C:\Users\MyName\WebstormProjects\simpleBlog\node_modules\bou
  rne\lib\bourne.js:52:30)
      at Object.&lt;anonymous&gt; (C:\Users\MyName\WebstormProjects\simpleBlog\server.j
  s:6:13)
      at Module._compile (module.js:460:26)
      at Object.Module._extensions..js (module.js:478:10)
      at Module.load (module.js:355:32)
      at Function.Module._load (module.js:310:12)
      at Function.Module.runMain (module.js:501:10)
      at startup (node.js:129:16)
      at node.js:814:3
  </code></pre>
  
  <p>I did digging before I decided to post this question. Comments elsewhere indicate this can happen if you're attempting to use an undefined/empty variable or if you're missing a '{' somewhere. </p>
  
  <p>That doesn't appear to be the case with this code, and this is literally straight out of the book. </p>
  
  <p>Webstorm does note that the app.configure function has an 'invalid number of arguments' and that it is 'expecting 2'. </p>
  
  <p>The book itself is not old at all, having come out in 2014. </p>
  
  <p>Just in case: this is not a 'homework' question, I'm trying to teach myself Backbone.js and it just so happens the technologies this author chose to facilitate that learning quest consisted of Node.js and Express among others.</p>
  
  <p>Thanks in advance!</p>