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