Skip to content

Commit

Permalink
fix(server): config wasn't added to default project
Browse files Browse the repository at this point in the history
  • Loading branch information
DaftMonk committed Jan 11, 2014
1 parent 27fa6d9 commit 79c5e02
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions templates/common/_package.json
Expand Up @@ -2,9 +2,9 @@
"name": "<%= _.slugify(appname) %>",
"version": "0.0.0",
"dependencies": {
"express": "~3.4.3"<% if (mongo) { %>,
"lodash": "~2.4.1",
"mongoose": "~3.5.5"<% } %><% if (mongo && mongoPassportUser) { %>,
"express": "~3.4.3",
"lodash": "~2.4.1"<% if (mongo) { %>,
"mongoose": "~3.5.5"<% } %><% if (mongoPassportUser) { %>,
"mongoose-unique-validator": "~0.3.0",
"connect-mongo": "~0.4.0",
"passport": "latest",
Expand Down
8 changes: 4 additions & 4 deletions templates/express/server.js
Expand Up @@ -12,8 +12,8 @@ var express = require('express')<% if (mongo) { %>,
// Default node environment to development
process.env.NODE_ENV = process.env.NODE_ENV || 'development';

<% if (mongo) { %>// Application Config
var config = require('./lib/config/config');
// Application Config
var config = require('./lib/config/config');<% if (mongo) { %>

// Connect to database
var db = mongoose.connect(config.mongo.uri, config.mongo.options);
Expand All @@ -25,8 +25,8 @@ fs.readdirSync(modelsPath).forEach(function (file) {
});

// Populate empty DB with sample data
require('./lib/config/dummydata');
<% } %><% if(mongoPassportUser) { %>
require('./lib/config/dummydata');<% } %><% if(mongoPassportUser) { %>
// Passport Configuration
require('./lib/config/passport')();<% } %>

Expand Down

0 comments on commit 79c5e02

Please sign in to comment.