You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
423 B

  1. var express = require('express');
  2. var mongoose = require('../../../lib');
  3. var uri = 'mongodb://localhost/mongoose-shared-connection';
  4. global.db = mongoose.createConnection(uri);
  5. var routes = require('./routes');
  6. var app = express();
  7. app.get('/', routes.home);
  8. app.get('/insert', routes.insert);
  9. app.get('/name', routes.modelName);
  10. app.listen(8000, function() {
  11. console.log('listening on http://localhost:8000');
  12. });