title: Mongoose and new Schema: returns "ReferenceError: Schema is not defined"
body: <p>I am creating a new sample application, where I try to connect to a MongoDB database through Mongoose.</p>
  
  <p>I create a new schema in my <code>service.js</code> file, but I get the following error when I run <code>nodemon app.js</code>: <code>"ReferenceError: Schema is not defined"</code></p>
  
  <p><strong>App.js code:</strong></p>
  
  <pre><code>var http = require('http');
  var express = require('express');
  var serials = require('./service');
  var app = express();
  var mongoose = require('mongoose');
  
  
  var port = 4000;
  app.listen(port);
  
  mongoose.connect('mongodb://localhost:27017/serialnumbers')
  
  app.get('/api/serials',function(req,res){
      serials.getSerial(req, res, function(err, data) {
          res.send(data);
      });
  });
  </code></pre>
  
  <p><strong>Service.js code:</strong></p>
  
  <pre><code>var mongoose = require('mongoose');
  
  var serialSchema = new Schema({
      serial: {type: String},
      game: {type: String},
      date: {type: Date, default: Date.now},
  });
  mongoose.model('serials', serialSchema);
  
  exports.getSerial = function(req,res,cb) {
      mongoose.model('serials').find(function(err,data) {
          cb(err,data);
      });
  };
  </code></pre>
  
  <p>I saw an answer here on StackOverflow that referenced it could be the version of Mongoose. But <code>npm list</code> gives me this:</p>
  
  <p><img src="https://i.stack.imgur.com/PoB5I.png" alt="enter image description here"></p>
  
  <p>Any idea what I am doing wrong?</p>