Skip to content
This repository was archived by the owner on Aug 30, 2021. It is now read-only.

Commit cb9d7e3

Browse files
committed
fix indentation
1 parent c959180 commit cb9d7e3

File tree

5 files changed

+114
-116
lines changed

5 files changed

+114
-116
lines changed

config/assets/cloud-foundry.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
'use strict';
22

33
module.exports = {
4-
client: {
5-
lib: {
6-
css: [
7-
'public/lib/bootstrap/dist/css/bootstrap.min.css',
8-
'public/lib/bootstrap/dist/css/bootstrap-theme.min.css',
9-
],
10-
js: [
11-
'public/lib/angular/angular.min.js',
12-
'public/lib/angular-resource/angular-resource.min.js',
13-
'public/lib/angular-animate/angular-animate.min.js',
14-
'public/lib/angular-ui-router/release/angular-ui-router.min.js',
15-
'public/lib/angular-ui-utils/ui-utils.min.js',
16-
'public/lib/angular-bootstrap/ui-bootstrap-tpls.min.js',
17-
'public/lib/angular-file-upload/angular-file-upload.min.js'
18-
]
19-
},
20-
css: 'public/dist/application.min.css',
21-
js: 'public/dist/application.min.js'
22-
}
23-
};
4+
client: {
5+
lib: {
6+
css: [
7+
'public/lib/bootstrap/dist/css/bootstrap.min.css',
8+
'public/lib/bootstrap/dist/css/bootstrap-theme.min.css',
9+
],
10+
js: [
11+
'public/lib/angular/angular.min.js',
12+
'public/lib/angular-resource/angular-resource.min.js',
13+
'public/lib/angular-animate/angular-animate.min.js',
14+
'public/lib/angular-ui-router/release/angular-ui-router.min.js',
15+
'public/lib/angular-ui-utils/ui-utils.min.js',
16+
'public/lib/angular-bootstrap/ui-bootstrap-tpls.min.js',
17+
'public/lib/angular-file-upload/angular-file-upload.min.js'
18+
]
19+
},
20+
css: 'public/dist/application.min.css',
21+
js: 'public/dist/application.min.js'
22+
}
23+
};

config/env/cloud-foundry.js

Lines changed: 63 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,70 @@
11
'use strict';
22

33
var cfenv = require('cfenv'),
4-
appEnv = cfenv.getAppEnv(),
5-
cfMongoUrl = appEnv.getService('mean-mongo') ?
6-
appEnv.getService('mean-mongo').credentials.uri : undefined;
4+
appEnv = cfenv.getAppEnv(),
5+
cfMongoUrl = appEnv.getService('mean-mongo') ?
6+
appEnv.getService('mean-mongo').credentials.uri : undefined;
77

8-
var getCred = function(serviceName, credProp) {
9-
return appEnv.getService(serviceName) ?
10-
appEnv.getService(serviceName).credentials[credProp] : undefined;
8+
var getCred = function (serviceName, credProp) {
9+
return appEnv.getService(serviceName) ?
10+
appEnv.getService(serviceName).credentials[credProp] : undefined;
1111
};
1212

1313
module.exports = {
14-
port: appEnv.port,
15-
db: {
16-
uri: cfMongoUrl,
17-
options: {
18-
user: '',
19-
pass: ''
20-
}
21-
},
22-
log: {
23-
// Can specify one of 'combined', 'common', 'dev', 'short', 'tiny'
24-
format: 'combined',
25-
// Stream defaults to process.stdout
26-
// By default we want logs to go to process.out so the Cloud Foundry Loggregator will collect them
27-
options: {
28-
}
29-
},
30-
facebook: {
31-
clientID: getCred('mean-facebook', 'id') || 'APP_ID',
32-
clientSecret: getCred('mean-facebook', 'secret') || 'APP_SECRET',
33-
callbackURL: '/api/auth/facebook/callback'
34-
},
35-
twitter: {
36-
clientID: getCred('mean-twitter', 'key') || 'CONSUMER_KEY',
37-
clientSecret: getCred('mean-twitter', 'secret') || 'CONSUMER_SECRET',
38-
callbackURL: '/api/auth/twitter/callback'
39-
},
40-
google: {
41-
clientID: getCred('mean-google', 'id') || 'APP_ID',
42-
clientSecret: getCred('mean-google', 'secret') || 'APP_SECRET',
43-
callbackURL: '/api/auth/google/callback'
44-
},
45-
linkedin: {
46-
clientID: getCred('mean-linkedin', 'id') || 'APP_ID',
47-
clientSecret: getCred('mean-linkedin', 'secret') || 'APP_SECRET',
48-
callbackURL: '/api/auth/linkedin/callback'
49-
},
50-
github: {
51-
clientID: getCred('mean-github', 'id') || 'APP_ID',
52-
clientSecret: getCred('mean-github', 'secret') || 'APP_SECRET',
53-
callbackURL: '/api/auth/github/callback'
54-
},
55-
paypal: {
56-
clientID: getCred('mean-paypal', 'id') || 'CLIENT_ID',
57-
clientSecret: getCred('mean-paypal', 'secret') || 'CLIENT_SECRET',
58-
callbackURL: '/api/auth/paypal/callback',
59-
sandbox: false
60-
},
61-
mailer: {
62-
from: getCred('mean-mail', 'from') || 'MAILER_FROM',
63-
options: {
64-
service: getCred('mean-mail', 'service') || 'MAILER_SERVICE_PROVIDER',
65-
auth: {
66-
user: getCred('mean-mail', 'username') || 'MAILER_EMAIL_ID',
67-
pass: getCred('mean-mail', 'password') || 'MAILER_PASSWORD'
68-
}
69-
}
70-
}
71-
};
14+
port: appEnv.port,
15+
db: {
16+
uri: cfMongoUrl,
17+
options: {
18+
user: '',
19+
pass: ''
20+
}
21+
},
22+
log: {
23+
// Can specify one of 'combined', 'common', 'dev', 'short', 'tiny'
24+
format: 'combined',
25+
// Stream defaults to process.stdout
26+
// By default we want logs to go to process.out so the Cloud Foundry Loggregator will collect them
27+
options: {}
28+
},
29+
facebook: {
30+
clientID: getCred('mean-facebook', 'id') || 'APP_ID',
31+
clientSecret: getCred('mean-facebook', 'secret') || 'APP_SECRET',
32+
callbackURL: '/api/auth/facebook/callback'
33+
},
34+
twitter: {
35+
clientID: getCred('mean-twitter', 'key') || 'CONSUMER_KEY',
36+
clientSecret: getCred('mean-twitter', 'secret') || 'CONSUMER_SECRET',
37+
callbackURL: '/api/auth/twitter/callback'
38+
},
39+
google: {
40+
clientID: getCred('mean-google', 'id') || 'APP_ID',
41+
clientSecret: getCred('mean-google', 'secret') || 'APP_SECRET',
42+
callbackURL: '/api/auth/google/callback'
43+
},
44+
linkedin: {
45+
clientID: getCred('mean-linkedin', 'id') || 'APP_ID',
46+
clientSecret: getCred('mean-linkedin', 'secret') || 'APP_SECRET',
47+
callbackURL: '/api/auth/linkedin/callback'
48+
},
49+
github: {
50+
clientID: getCred('mean-github', 'id') || 'APP_ID',
51+
clientSecret: getCred('mean-github', 'secret') || 'APP_SECRET',
52+
callbackURL: '/api/auth/github/callback'
53+
},
54+
paypal: {
55+
clientID: getCred('mean-paypal', 'id') || 'CLIENT_ID',
56+
clientSecret: getCred('mean-paypal', 'secret') || 'CLIENT_SECRET',
57+
callbackURL: '/api/auth/paypal/callback',
58+
sandbox: false
59+
},
60+
mailer: {
61+
from: getCred('mean-mail', 'from') || 'MAILER_FROM',
62+
options: {
63+
service: getCred('mean-mail', 'service') || 'MAILER_SERVICE_PROVIDER',
64+
auth: {
65+
user: getCred('mean-mail', 'username') || 'MAILER_EMAIL_ID',
66+
pass: getCred('mean-mail', 'password') || 'MAILER_PASSWORD'
67+
}
68+
}
69+
}
70+
};

config/lib/app.js

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,49 +4,48 @@
44
* Module dependencies.
55
*/
66
var config = require('../config'),
7-
mongoose = require('./mongoose'),
8-
express = require('./express'),
9-
chalk = require('chalk');
7+
mongoose = require('./mongoose'),
8+
express = require('./express'),
9+
chalk = require('chalk');
1010

1111
// Initialize Models
1212
mongoose.loadModels();
1313

1414
module.exports.loadModels = function loadModels() {
15-
mongoose.loadModels();
15+
mongoose.loadModels();
1616
};
1717

1818
module.exports.init = function init(callback) {
19+
mongoose.connect(function (db) {
20+
// Initialize express
21+
var app = express.init(db);
22+
if (callback) callback(app, db, config);
1923

20-
mongoose.connect(function (db) {
21-
// Initialize express
22-
var app = express.init(db);
23-
if (callback) callback(app, db, config);
24-
25-
});
24+
});
2625
};
2726

2827
module.exports.start = function start(callback) {
29-
var _this = this;
28+
var _this = this;
3029

31-
_this.init(function(app, db, config) {
30+
_this.init(function (app, db, config) {
3231

33-
// Start the app by listening on <port>
34-
app.listen(config.port, function() {
32+
// Start the app by listening on <port>
33+
app.listen(config.port, function () {
3534

36-
// Logging initialization
37-
console.log('--');
38-
console.log(chalk.green(config.app.title));
39-
console.log(chalk.green('Environment:\t\t\t' + process.env.NODE_ENV));
40-
console.log(chalk.green('Port:\t\t\t\t' + config.port));
41-
console.log(chalk.green('Database:\t\t\t\t' + config.db.uri));
42-
if (process.env.NODE_ENV === 'secure') {
43-
console.log(chalk.green('HTTPs:\t\t\t\ton'));
44-
}
45-
console.log('--');
35+
// Logging initialization
36+
console.log('--');
37+
console.log(chalk.green(config.app.title));
38+
console.log(chalk.green('Environment:\t\t\t' + process.env.NODE_ENV));
39+
console.log(chalk.green('Port:\t\t\t\t' + config.port));
40+
console.log(chalk.green('Database:\t\t\t\t' + config.db.uri));
41+
if (process.env.NODE_ENV === 'secure') {
42+
console.log(chalk.green('HTTPs:\t\t\t\ton'));
43+
}
44+
console.log('--');
4645

47-
if (callback) callback(app, db, config);
48-
});
46+
if (callback) callback(app, db, config);
47+
});
4948

50-
});
49+
});
5150

5251
};

config/lib/express.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@ module.exports.initHelmetHeaders = function (app) {
142142
app.use(helmet.nosniff());
143143
app.use(helmet.ienoopen());
144144
app.use(helmet.hsts({
145-
maxAge: SIX_MONTHS,
146-
includeSubdomains: true,
147-
force: true
145+
maxAge: SIX_MONTHS,
146+
includeSubdomains: true,
147+
force: true
148148
}));
149149
app.disable('x-powered-by');
150150
};

modules/users/server/controllers/users/users.authentication.server.controller.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ var path = require('path'),
1111

1212
// URLs for which user can't be redirected on signin
1313
var noReturnUrls = [
14-
'/authentication/signin',
15-
'/authentication/signup'
14+
'/authentication/signin',
15+
'/authentication/signup'
1616
];
1717

1818
/**

0 commit comments

Comments
 (0)