mirror of
https://github.com/mattstyles/yeoman-angular-express-plus.git
synced 2026-01-10 06:57:55 -05:00
lint fix
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
var appConfig = require( '../../app-config.json' ),
|
||||
db = require( '../db' ).db( appConfig.database.name );
|
||||
|
||||
// Example route
|
||||
// Example route - returns all items in database collection
|
||||
module.exports = function( req, res ) {
|
||||
|
||||
console.log( 'Accessing database ' + db.databaseName );
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
'use strict';
|
||||
/* jshint camelcase: false */
|
||||
|
||||
// Dependencies
|
||||
var mongo = require( 'mongodb' ),
|
||||
appConfig = require( '../../app-config.json' );
|
||||
appConfig = require( '../../app-config.json' ),
|
||||
createDummyCollection;
|
||||
|
||||
// Create mongo server
|
||||
var server = new mongo.Server( appConfig.database.host, appConfig.database.port, { auto_reconnect: true } ),
|
||||
@@ -35,7 +37,7 @@ client.open( function( err, client ) {
|
||||
return err;
|
||||
}
|
||||
|
||||
if ( !items.length > 0 ) {
|
||||
if ( items.length <= 0 ) {
|
||||
createDummyCollection( collection );
|
||||
}
|
||||
} );
|
||||
@@ -45,7 +47,7 @@ client.open( function( err, client ) {
|
||||
|
||||
|
||||
// Create dummy data for the collection
|
||||
var createDummyCollection = function( collection ) {
|
||||
createDummyCollection = function( collection ) {
|
||||
console.log( 'Creating collection...' );
|
||||
|
||||
var dummy = [{
|
||||
|
||||
Reference in New Issue
Block a user