Skip to content

Commit

Permalink
mongoose 链接配置放进 app.js
Browse files Browse the repository at this point in the history
  • Loading branch information
alsotang committed Nov 6, 2014
1 parent bf56660 commit 0e4a683
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ var Post = model.Post;
var config = require('./config');
var moment = require('moment');

mongoose.connect(config.mongodb_url);

var app = express();
var hbs = exphbs.create({
defaultLayout: 'main',
Expand Down
2 changes: 0 additions & 2 deletions model.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var config = require('./config');
mongoose.connect(config.mongodb_url);

var PostSchema = new Schema({
url: String,
Expand Down

0 comments on commit 0e4a683

Please sign in to comment.