mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-05-07 13:27:18 +02:00
Fixing Indentation Convention to TABS
This commit is contained in:
7
.bowerrc
7
.bowerrc
@@ -1,8 +1,3 @@
|
||||
{
|
||||
"directory": "public/lib",
|
||||
"storage": {
|
||||
"packages": ".bower-cache",
|
||||
"registry": ".bower-registry"
|
||||
},
|
||||
"tmp": ".bower-tmp"
|
||||
"directory": "public/lib"
|
||||
}
|
||||
|
||||
78
.jshintrc
78
.jshintrc
@@ -1,41 +1,41 @@
|
||||
{
|
||||
"node": true, // Enable globals available when code is running inside of the NodeJS runtime environment.
|
||||
"browser": true, // Standard browser globals e.g. `window`, `document`.
|
||||
"esnext": true, // Allow ES.next specific features such as `const` and `let`.
|
||||
"bitwise": false, // Prohibit bitwise operators (&, |, ^, etc.).
|
||||
"camelcase": false, // Permit only camelcase for `var` and `object indexes`.
|
||||
"curly": false, // Require {} for every new block or scope.
|
||||
"eqeqeq": true, // Require triple equals i.e. `===`.
|
||||
"immed": true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
|
||||
"latedef": true, // Prohibit variable use before definition.
|
||||
"newcap": true, // Require capitalization of all constructor functions e.g. `new F()`.
|
||||
"noarg": true, // Prohibit use of `arguments.caller` and `arguments.callee`.
|
||||
"quotmark": "single", // Define quotes to string values.
|
||||
"regexp": true, // Prohibit `.` and `[^...]` in regular expressions.
|
||||
"undef": true, // Require all non-global variables be declared before they are used.
|
||||
"unused": false, // Warn unused variables.
|
||||
"strict": true, // Require `use strict` pragma in every file.
|
||||
"trailing": true, // Prohibit trailing whitespaces.
|
||||
"smarttabs": false, // Suppresses warnings about mixed tabs and spaces
|
||||
"globals": { // Globals variables.
|
||||
"angular": true,
|
||||
"ApplicationConfiguration": true
|
||||
},
|
||||
"predef": [ // Extra globals.
|
||||
"define",
|
||||
"require",
|
||||
"exports",
|
||||
"module",
|
||||
"describe",
|
||||
"before",
|
||||
"beforeEach",
|
||||
"after",
|
||||
"afterEach",
|
||||
"it",
|
||||
"inject",
|
||||
"expect"
|
||||
],
|
||||
"indent": 4, // Specify indentation spacing
|
||||
"devel": true, // Allow development statements e.g. `console.log();`.
|
||||
"noempty": true // Prohibit use of empty blocks.
|
||||
"node": true, // Enable globals available when code is running inside of the NodeJS runtime environment.
|
||||
"browser": true, // Standard browser globals e.g. `window`, `document`.
|
||||
"esnext": true, // Allow ES.next specific features such as `const` and `let`.
|
||||
"bitwise": false, // Prohibit bitwise operators (&, |, ^, etc.).
|
||||
"camelcase": false, // Permit only camelcase for `var` and `object indexes`.
|
||||
"curly": false, // Require {} for every new block or scope.
|
||||
"eqeqeq": true, // Require triple equals i.e. `===`.
|
||||
"immed": true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
|
||||
"latedef": true, // Prohibit variable use before definition.
|
||||
"newcap": true, // Require capitalization of all constructor functions e.g. `new F()`.
|
||||
"noarg": true, // Prohibit use of `arguments.caller` and `arguments.callee`.
|
||||
"quotmark": "single", // Define quotes to string values.
|
||||
"regexp": true, // Prohibit `.` and `[^...]` in regular expressions.
|
||||
"undef": true, // Require all non-global variables be declared before they are used.
|
||||
"unused": false, // Warn unused variables.
|
||||
"strict": true, // Require `use strict` pragma in every file.
|
||||
"trailing": true, // Prohibit trailing whitespaces.
|
||||
"smarttabs": false, // Suppresses warnings about mixed tabs and spaces
|
||||
"globals": { // Globals variables.
|
||||
"angular": true,
|
||||
"ApplicationConfiguration": true
|
||||
},
|
||||
"predef": [ // Extra globals.
|
||||
"define",
|
||||
"require",
|
||||
"exports",
|
||||
"module",
|
||||
"describe",
|
||||
"before",
|
||||
"beforeEach",
|
||||
"after",
|
||||
"afterEach",
|
||||
"it",
|
||||
"inject",
|
||||
"expect"
|
||||
],
|
||||
"indent": 4, // Specify indentation spacing
|
||||
"devel": true, // Allow development statements e.g. `console.log();`.
|
||||
"noempty": true // Prohibit use of empty blocks.
|
||||
}
|
||||
@@ -4,104 +4,104 @@
|
||||
* Module dependencies.
|
||||
*/
|
||||
var mongoose = require('mongoose'),
|
||||
Article = mongoose.model('Article'),
|
||||
_ = require('lodash');
|
||||
Article = mongoose.model('Article'),
|
||||
_ = require('lodash');
|
||||
|
||||
/**
|
||||
* Create a article
|
||||
*/
|
||||
exports.create = function(req, res) {
|
||||
var article = new Article(req.body);
|
||||
article.user = req.user;
|
||||
var article = new Article(req.body);
|
||||
article.user = req.user;
|
||||
|
||||
article.save(function(err) {
|
||||
if (err) {
|
||||
return res.send('users/signup', {
|
||||
errors: err.errors,
|
||||
article: article
|
||||
});
|
||||
} else {
|
||||
res.jsonp(article);
|
||||
}
|
||||
});
|
||||
article.save(function(err) {
|
||||
if (err) {
|
||||
return res.send('users/signup', {
|
||||
errors: err.errors,
|
||||
article: article
|
||||
});
|
||||
} else {
|
||||
res.jsonp(article);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Show the current article
|
||||
*/
|
||||
exports.read = function(req, res) {
|
||||
res.jsonp(req.article);
|
||||
res.jsonp(req.article);
|
||||
};
|
||||
|
||||
/**
|
||||
* Update a article
|
||||
*/
|
||||
exports.update = function(req, res) {
|
||||
var article = req.article;
|
||||
var article = req.article;
|
||||
|
||||
article = _.extend(article, req.body);
|
||||
article = _.extend(article, req.body);
|
||||
|
||||
article.save(function(err) {
|
||||
if (err) {
|
||||
res.render('error', {
|
||||
status: 500
|
||||
});
|
||||
} else {
|
||||
res.jsonp(article);
|
||||
}
|
||||
});
|
||||
article.save(function(err) {
|
||||
if (err) {
|
||||
res.render('error', {
|
||||
status: 500
|
||||
});
|
||||
} else {
|
||||
res.jsonp(article);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Delete an article
|
||||
*/
|
||||
exports.delete = function(req, res) {
|
||||
var article = req.article;
|
||||
var article = req.article;
|
||||
|
||||
article.remove(function(err) {
|
||||
if (err) {
|
||||
res.render('error', {
|
||||
status: 500
|
||||
});
|
||||
} else {
|
||||
res.jsonp(article);
|
||||
}
|
||||
});
|
||||
article.remove(function(err) {
|
||||
if (err) {
|
||||
res.render('error', {
|
||||
status: 500
|
||||
});
|
||||
} else {
|
||||
res.jsonp(article);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* List of Articles
|
||||
*/
|
||||
exports.list = function(req, res) {
|
||||
Article.find().sort('-created').populate('user', 'displayName').exec(function(err, articles) {
|
||||
if (err) {
|
||||
res.render('error', {
|
||||
status: 500
|
||||
});
|
||||
} else {
|
||||
res.jsonp(articles);
|
||||
}
|
||||
});
|
||||
Article.find().sort('-created').populate('user', 'displayName').exec(function(err, articles) {
|
||||
if (err) {
|
||||
res.render('error', {
|
||||
status: 500
|
||||
});
|
||||
} else {
|
||||
res.jsonp(articles);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Article middleware
|
||||
*/
|
||||
exports.articleByID = function(req, res, next, id) {
|
||||
Article.load(id, function(err, article) {
|
||||
if (err) return next(err);
|
||||
if (!article) return next(new Error('Failed to load article ' + id));
|
||||
req.article = article;
|
||||
next();
|
||||
});
|
||||
Article.load(id, function(err, article) {
|
||||
if (err) return next(err);
|
||||
if (!article) return next(new Error('Failed to load article ' + id));
|
||||
req.article = article;
|
||||
next();
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Article authorization middleware
|
||||
*/
|
||||
exports.hasAuthorization = function(req, res, next) {
|
||||
if (req.article.user.id !== req.user.id) {
|
||||
return res.send(403, 'User is not authorized');
|
||||
}
|
||||
next();
|
||||
if (req.article.user.id !== req.user.id) {
|
||||
return res.send(403, 'User is not authorized');
|
||||
}
|
||||
next();
|
||||
};
|
||||
@@ -4,7 +4,7 @@
|
||||
* Module dependencies.
|
||||
*/
|
||||
exports.index = function(req, res) {
|
||||
res.render('index.html', {
|
||||
res.render('index.html', {
|
||||
user: req.user || null
|
||||
});
|
||||
};
|
||||
});
|
||||
};
|
||||
@@ -4,48 +4,48 @@
|
||||
* Module dependencies.
|
||||
*/
|
||||
var mongoose = require('mongoose'),
|
||||
Schema = mongoose.Schema;
|
||||
Schema = mongoose.Schema;
|
||||
|
||||
/**
|
||||
* Article Schema
|
||||
*/
|
||||
var ArticleSchema = new Schema({
|
||||
created: {
|
||||
type: Date,
|
||||
default: Date.now
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: '',
|
||||
trim: true
|
||||
},
|
||||
content: {
|
||||
type: String,
|
||||
default: '',
|
||||
trim: true
|
||||
},
|
||||
user: {
|
||||
type: Schema.ObjectId,
|
||||
ref: 'User'
|
||||
}
|
||||
created: {
|
||||
type: Date,
|
||||
default: Date.now
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: '',
|
||||
trim: true
|
||||
},
|
||||
content: {
|
||||
type: String,
|
||||
default: '',
|
||||
trim: true
|
||||
},
|
||||
user: {
|
||||
type: Schema.ObjectId,
|
||||
ref: 'User'
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Validations
|
||||
*/
|
||||
ArticleSchema.path('title').validate(function(title) {
|
||||
return title.length;
|
||||
return title.length;
|
||||
}, 'Title cannot be blank');
|
||||
|
||||
/**
|
||||
* Statics
|
||||
*/
|
||||
ArticleSchema.statics = {
|
||||
load: function(id, cb) {
|
||||
this.findOne({
|
||||
_id: id
|
||||
}).populate('user', 'displayName').exec(cb);
|
||||
}
|
||||
load: function(id, cb) {
|
||||
this.findOne({
|
||||
_id: id
|
||||
}).populate('user', 'displayName').exec(cb);
|
||||
}
|
||||
};
|
||||
|
||||
mongoose.model('Article', ArticleSchema);
|
||||
@@ -14,28 +14,28 @@ var UserSchema = new Schema({
|
||||
firstName: {
|
||||
type: String,
|
||||
default: '',
|
||||
trim: true
|
||||
trim: true
|
||||
},
|
||||
lastName: {
|
||||
type: String,
|
||||
default: '',
|
||||
trim: true
|
||||
trim: true
|
||||
},
|
||||
displayName: {
|
||||
type: String,
|
||||
default: '',
|
||||
trim: true
|
||||
trim: true
|
||||
},
|
||||
email: {
|
||||
type: String,
|
||||
default: '',
|
||||
trim: true,
|
||||
trim: true,
|
||||
unique: true
|
||||
},
|
||||
username: {
|
||||
type: String,
|
||||
default: '',
|
||||
trim: true,
|
||||
trim: true,
|
||||
unique: true
|
||||
},
|
||||
provider: {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function(app) {
|
||||
var users = require('../../app/controllers/users');
|
||||
var articles = require('../../app/controllers/articles');
|
||||
var users = require('../../app/controllers/users');
|
||||
var articles = require('../../app/controllers/articles');
|
||||
|
||||
// Article Routes
|
||||
app.get('/articles', articles.list);
|
||||
app.post('/articles', users.requiresLogin, articles.create);
|
||||
app.get('/articles/:articleId', articles.read);
|
||||
app.put('/articles/:articleId', users.requiresLogin, articles.hasAuthorization, articles.update);
|
||||
app.del('/articles/:articleId', users.requiresLogin, articles.hasAuthorization, articles.delete);
|
||||
// Article Routes
|
||||
app.get('/articles', articles.list);
|
||||
app.post('/articles', users.requiresLogin, articles.create);
|
||||
app.get('/articles/:articleId', articles.read);
|
||||
app.put('/articles/:articleId', users.requiresLogin, articles.hasAuthorization, articles.update);
|
||||
app.del('/articles/:articleId', users.requiresLogin, articles.hasAuthorization, articles.delete);
|
||||
|
||||
// Finish by binding the article middleware
|
||||
app.param('articleId', articles.articleByID);
|
||||
// Finish by binding the article middleware
|
||||
app.param('articleId', articles.articleByID);
|
||||
};
|
||||
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function(app) {
|
||||
// Root routing
|
||||
var core = require('../../app/controllers/core');
|
||||
app.get('/', core.index);
|
||||
// Root routing
|
||||
var core = require('../../app/controllers/core');
|
||||
app.get('/', core.index);
|
||||
};
|
||||
@@ -3,6 +3,6 @@
|
||||
{% block content %}
|
||||
<h1>Page Not Found</h1>
|
||||
<pre>
|
||||
{{url}} is not a valid path.
|
||||
{{url}} is not a valid path.
|
||||
</pre>
|
||||
{% endblock %}
|
||||
@@ -3,6 +3,6 @@
|
||||
{% block content %}
|
||||
<h1>Server Error</h1>
|
||||
<pre>
|
||||
{{error}}
|
||||
{{error}}
|
||||
</pre>
|
||||
{% endblock %}
|
||||
@@ -2,84 +2,84 @@
|
||||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<title>{{title}}</title>
|
||||
<title>{{title}}</title>
|
||||
|
||||
<!-- General META -->
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<!-- General META -->
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
|
||||
<!-- Semantic META -->
|
||||
<meta name="keywords" content="{{keywords}}">
|
||||
<meta name="description" content="{{description}}">
|
||||
<!-- Semantic META -->
|
||||
<meta name="keywords" content="{{keywords}}">
|
||||
<meta name="description" content="{{description}}">
|
||||
|
||||
<!-- Social META -->
|
||||
<meta property="fb:app_id" content="{{facebookAppId}}">
|
||||
<meta property="og:site_name" content="{{title}}">
|
||||
<meta property="og:title" content="{{title}}">
|
||||
<meta property="og:description" content="{{description}}">
|
||||
<meta property="og:url" content="{{url}}">
|
||||
<meta property="og:image" content="/img/brand/logo.png">
|
||||
<meta property="og:type" content="website">
|
||||
<!-- Social META -->
|
||||
<meta property="fb:app_id" content="{{facebookAppId}}">
|
||||
<meta property="og:site_name" content="{{title}}">
|
||||
<meta property="og:title" content="{{title}}">
|
||||
<meta property="og:description" content="{{description}}">
|
||||
<meta property="og:url" content="{{url}}">
|
||||
<meta property="og:image" content="/img/brand/logo.png">
|
||||
<meta property="og:type" content="website">
|
||||
|
||||
<!-- Fav Icon -->
|
||||
<link href="/img/brand/favicon.ico" rel="shortcut icon" type="image/x-icon">
|
||||
<!-- Fav Icon -->
|
||||
<link href="/img/brand/favicon.ico" rel="shortcut icon" type="image/x-icon">
|
||||
|
||||
<!-- Bootstrap CSS -->
|
||||
<link rel="stylesheet" href="/lib/bootstrap/dist/css/bootstrap.css">
|
||||
<link rel="stylesheet" href="/lib/bootstrap/dist/css/bootstrap-theme.css">
|
||||
<!-- Bootstrap CSS -->
|
||||
<link rel="stylesheet" href="/lib/bootstrap/dist/css/bootstrap.css">
|
||||
<link rel="stylesheet" href="/lib/bootstrap/dist/css/bootstrap-theme.css">
|
||||
|
||||
<!-- Application CSS -->
|
||||
<link rel="stylesheet" href="/css/common.css">
|
||||
<!-- Application CSS -->
|
||||
<link rel="stylesheet" href="/css/common.css">
|
||||
|
||||
<!--Application Modules CSS-->
|
||||
{% for modulesCSSFile in modulesCSSFiles %}
|
||||
<link rel="stylesheet" href="{{modulesCSSFile}}">
|
||||
{% endfor %}
|
||||
<!--Application Modules CSS-->
|
||||
{% for modulesCSSFile in modulesCSSFiles %}
|
||||
<link rel="stylesheet" href="{{modulesCSSFile}}">{% endfor %}
|
||||
|
||||
<!-- HTML5 Shim -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<!-- HTML5 Shim -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header data-ng-include="'/modules/core/views/header.html'" class="navbar navbar-fixed-top navbar-inverse"></header>
|
||||
<section class="content">
|
||||
<section class="container">
|
||||
{% block content %}{% endblock %}
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<header data-ng-include="'/modules/core/views/header.html'" class="navbar navbar-fixed-top navbar-inverse"></header>
|
||||
<section class="content">
|
||||
<section class="container">
|
||||
{% block content %}{% endblock %}
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<!--Embedding The User Object-->
|
||||
<script type="text/javascript">
|
||||
var user = {{user | json | safe}};
|
||||
var user = {{ user | json | safe }};
|
||||
</script>
|
||||
|
||||
<!--AngularJS-->
|
||||
<script type="text/javascript" src="/lib/angular/angular.js"></script>
|
||||
<script type="text/javascript" src="/lib/angular-route/angular-route.js"></script>
|
||||
<script type="text/javascript" src="/lib/angular-resource/angular-resource.js"></script>
|
||||
<script type="text/javascript" src="/lib/angular-cookies/angular-cookies.js"></script>
|
||||
<script type="text/javascript" src="/lib/angular-animate/angular-animate.js"></script>
|
||||
|
||||
<!--Angular UI-->
|
||||
<script type="text/javascript" src="/lib/angular-bootstrap/ui-bootstrap.js"></script>
|
||||
<script type="text/javascript" src="/lib/angular-ui-utils/ui-utils.js"></script>
|
||||
<!--AngularJS-->
|
||||
<script type="text/javascript" src="/lib/angular/angular.js"></script>
|
||||
<script type="text/javascript" src="/lib/angular-route/angular-route.js"></script>
|
||||
<script type="text/javascript" src="/lib/angular-resource/angular-resource.js"></script>
|
||||
<script type="text/javascript" src="/lib/angular-cookies/angular-cookies.js"></script>
|
||||
<script type="text/javascript" src="/lib/angular-animate/angular-animate.js"></script>
|
||||
|
||||
<!--AngularJS Application Init-->
|
||||
<script type="text/javascript" src="/js/config.js"></script>
|
||||
<script type="text/javascript" src="/js/application.js"></script>
|
||||
<!--Angular UI-->
|
||||
<script type="text/javascript" src="/lib/angular-bootstrap/ui-bootstrap.js"></script>
|
||||
<script type="text/javascript" src="/lib/angular-ui-utils/ui-utils.js"></script>
|
||||
|
||||
<!--Application Modules-->
|
||||
{% for modulesJSFile in modulesJSFiles %}
|
||||
<script type="text/javascript" src="{{modulesJSFile}}"></script>
|
||||
{% endfor %}
|
||||
|
||||
{% if process.env.NODE_ENV === 'development' %}
|
||||
<!--Livereload script rendered -->
|
||||
<script type="text/javascript" src="http://localhost:35729/livereload.js"></script>
|
||||
<!--AngularJS Application Init-->
|
||||
<script type="text/javascript" src="/js/config.js"></script>
|
||||
<script type="text/javascript" src="/js/application.js"></script>
|
||||
|
||||
<!--Application Modules-->
|
||||
{% for modulesJSFile in modulesJSFiles %}
|
||||
<script type="text/javascript" src="{{modulesJSFile}}"></script>
|
||||
{% endfor %}
|
||||
|
||||
{% if process.env.NODE_ENV === 'development' %}
|
||||
<!--Livereload script rendered -->
|
||||
<script type="text/javascript" src="http://localhost:35729/livereload.js"></script>
|
||||
{% endif %}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
16
config/env/all.js
vendored
16
config/env/all.js
vendored
@@ -1,17 +1,17 @@
|
||||
'use strict';
|
||||
|
||||
var path = require('path'),
|
||||
rootPath = path.normalize(__dirname + '/../..');
|
||||
rootPath = path.normalize(__dirname + '/../..');
|
||||
|
||||
module.exports = {
|
||||
app: {
|
||||
title: 'MEAN.JS',
|
||||
description: 'Full-Stack JavaScript with MongoDB, Express, AngularJS, and Node.js',
|
||||
keywords: 'mongodb, express, angularjs, node.js, mongoose, passport'
|
||||
},
|
||||
app: {
|
||||
title: 'MEAN.JS',
|
||||
description: 'Full-Stack JavaScript with MongoDB, Express, AngularJS, and Node.js',
|
||||
keywords: 'mongodb, express, angularjs, node.js, mongoose, passport'
|
||||
},
|
||||
db: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI,
|
||||
root: rootPath,
|
||||
port: process.env.PORT || 3000,
|
||||
root: rootPath,
|
||||
port: process.env.PORT || 3000,
|
||||
templateEngine: 'swig',
|
||||
sessionSecret: 'MEAN',
|
||||
sessionCollection: 'sessions'
|
||||
|
||||
48
config/env/development.js
vendored
48
config/env/development.js
vendored
@@ -1,28 +1,28 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
db: 'mongodb://localhost/mean-dev',
|
||||
app: {
|
||||
title: 'MEAN.JS - Development Environment'
|
||||
},
|
||||
facebook: {
|
||||
clientID: 'APP_ID',
|
||||
clientSecret: 'APP_SECRET',
|
||||
callbackURL: 'http://localhost:3000/auth/facebook/callback'
|
||||
},
|
||||
twitter: {
|
||||
clientID: 'CONSUMER_KEY',
|
||||
clientSecret: 'CONSUMER_SECRET',
|
||||
callbackURL: 'http://localhost:3000/auth/twitter/callback'
|
||||
},
|
||||
google: {
|
||||
clientID: 'APP_ID',
|
||||
clientSecret: 'APP_SECRET',
|
||||
callbackURL: 'http://localhost:3000/auth/google/callback'
|
||||
},
|
||||
linkedin: {
|
||||
clientID: 'APP_ID',
|
||||
clientSecret: 'APP_SECRET',
|
||||
callbackURL: 'http://www.temoj.com/auth/linkedin/callback'
|
||||
}
|
||||
db: 'mongodb://localhost/mean-dev',
|
||||
app: {
|
||||
title: 'MEAN.JS - Development Environment'
|
||||
},
|
||||
facebook: {
|
||||
clientID: 'APP_ID',
|
||||
clientSecret: 'APP_SECRET',
|
||||
callbackURL: 'http://localhost:3000/auth/facebook/callback'
|
||||
},
|
||||
twitter: {
|
||||
clientID: 'CONSUMER_KEY',
|
||||
clientSecret: 'CONSUMER_SECRET',
|
||||
callbackURL: 'http://localhost:3000/auth/twitter/callback'
|
||||
},
|
||||
google: {
|
||||
clientID: 'APP_ID',
|
||||
clientSecret: 'APP_SECRET',
|
||||
callbackURL: 'http://localhost:3000/auth/google/callback'
|
||||
},
|
||||
linkedin: {
|
||||
clientID: 'APP_ID',
|
||||
clientSecret: 'APP_SECRET',
|
||||
callbackURL: 'http://www.temoj.com/auth/linkedin/callback'
|
||||
}
|
||||
};
|
||||
42
config/env/production.js
vendored
42
config/env/production.js
vendored
@@ -1,25 +1,25 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
db: 'mongodb://localhost/mean',
|
||||
facebook: {
|
||||
clientID: 'APP_ID',
|
||||
clientSecret: 'APP_SECRET',
|
||||
callbackURL: 'http://localhost:3000/auth/facebook/callback'
|
||||
},
|
||||
twitter: {
|
||||
clientID: 'CONSUMER_KEY',
|
||||
clientSecret: 'CONSUMER_SECRET',
|
||||
callbackURL: 'http://localhost:3000/auth/twitter/callback'
|
||||
},
|
||||
google: {
|
||||
clientID: 'APP_ID',
|
||||
clientSecret: 'APP_SECRET',
|
||||
callbackURL: 'http://localhost:3000/auth/google/callback'
|
||||
},
|
||||
linkedin: {
|
||||
clientID: 'APP_ID',
|
||||
clientSecret: 'APP_SECRET',
|
||||
callbackURL: 'http://www.temoj.com/auth/linkedin/callback'
|
||||
}
|
||||
db: 'mongodb://localhost/mean',
|
||||
facebook: {
|
||||
clientID: 'APP_ID',
|
||||
clientSecret: 'APP_SECRET',
|
||||
callbackURL: 'http://localhost:3000/auth/facebook/callback'
|
||||
},
|
||||
twitter: {
|
||||
clientID: 'CONSUMER_KEY',
|
||||
clientSecret: 'CONSUMER_SECRET',
|
||||
callbackURL: 'http://localhost:3000/auth/twitter/callback'
|
||||
},
|
||||
google: {
|
||||
clientID: 'APP_ID',
|
||||
clientSecret: 'APP_SECRET',
|
||||
callbackURL: 'http://localhost:3000/auth/google/callback'
|
||||
},
|
||||
linkedin: {
|
||||
clientID: 'APP_ID',
|
||||
clientSecret: 'APP_SECRET',
|
||||
callbackURL: 'http://www.temoj.com/auth/linkedin/callback'
|
||||
}
|
||||
};
|
||||
50
config/env/test.js
vendored
50
config/env/test.js
vendored
@@ -1,29 +1,29 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
db: 'mongodb://localhost/mean-test',
|
||||
port: 3001,
|
||||
app: {
|
||||
title: 'MEAN.JS - Test Environment'
|
||||
},
|
||||
facebook: {
|
||||
clientID: 'APP_ID',
|
||||
clientSecret: 'APP_SECRET',
|
||||
callbackURL: 'http://localhost:3000/auth/facebook/callback'
|
||||
},
|
||||
twitter: {
|
||||
clientID: 'CONSUMER_KEY',
|
||||
clientSecret: 'CONSUMER_SECRET',
|
||||
callbackURL: 'http://localhost:3000/auth/twitter/callback'
|
||||
},
|
||||
google: {
|
||||
clientID: 'APP_ID',
|
||||
clientSecret: 'APP_SECRET',
|
||||
callbackURL: 'http://localhost:3000/auth/google/callback'
|
||||
},
|
||||
linkedin: {
|
||||
clientID: 'APP_ID',
|
||||
clientSecret: 'APP_SECRET',
|
||||
callbackURL: 'http://localhost:3000/auth/linkedin/callback'
|
||||
}
|
||||
db: 'mongodb://localhost/mean-test',
|
||||
port: 3001,
|
||||
app: {
|
||||
title: 'MEAN.JS - Test Environment'
|
||||
},
|
||||
facebook: {
|
||||
clientID: 'APP_ID',
|
||||
clientSecret: 'APP_SECRET',
|
||||
callbackURL: 'http://localhost:3000/auth/facebook/callback'
|
||||
},
|
||||
twitter: {
|
||||
clientID: 'CONSUMER_KEY',
|
||||
clientSecret: 'CONSUMER_SECRET',
|
||||
callbackURL: 'http://localhost:3000/auth/twitter/callback'
|
||||
},
|
||||
google: {
|
||||
clientID: 'APP_ID',
|
||||
clientSecret: 'APP_SECRET',
|
||||
callbackURL: 'http://localhost:3000/auth/google/callback'
|
||||
},
|
||||
linkedin: {
|
||||
clientID: 'APP_ID',
|
||||
clientSecret: 'APP_SECRET',
|
||||
callbackURL: 'http://localhost:3000/auth/linkedin/callback'
|
||||
}
|
||||
};
|
||||
50
config/env/travis.js
vendored
50
config/env/travis.js
vendored
@@ -1,29 +1,29 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
db: 'mongodb://localhost/mean-travis',
|
||||
port: 3001,
|
||||
app: {
|
||||
title: 'MEAN.JS - Travis Environment'
|
||||
},
|
||||
facebook: {
|
||||
clientID: 'APP_ID',
|
||||
clientSecret: 'APP_SECRET',
|
||||
callbackURL: 'http://localhost:3000/auth/facebook/callback'
|
||||
},
|
||||
twitter: {
|
||||
clientID: 'CONSUMER_KEY',
|
||||
clientSecret: 'CONSUMER_SECRET',
|
||||
callbackURL: 'http://localhost:3000/auth/twitter/callback'
|
||||
},
|
||||
google: {
|
||||
clientID: 'APP_ID',
|
||||
clientSecret: 'APP_SECRET',
|
||||
callbackURL: 'http://localhost:3000/auth/google/callback'
|
||||
},
|
||||
linkedin: {
|
||||
clientID: 'APP_ID',
|
||||
clientSecret: 'APP_SECRET',
|
||||
callbackURL: 'http://localhost:3000/auth/linkedin/callback'
|
||||
}
|
||||
db: 'mongodb://localhost/mean-travis',
|
||||
port: 3001,
|
||||
app: {
|
||||
title: 'MEAN.JS - Travis Environment'
|
||||
},
|
||||
facebook: {
|
||||
clientID: 'APP_ID',
|
||||
clientSecret: 'APP_SECRET',
|
||||
callbackURL: 'http://localhost:3000/auth/facebook/callback'
|
||||
},
|
||||
twitter: {
|
||||
clientID: 'CONSUMER_KEY',
|
||||
clientSecret: 'CONSUMER_SECRET',
|
||||
callbackURL: 'http://localhost:3000/auth/twitter/callback'
|
||||
},
|
||||
google: {
|
||||
clientID: 'APP_ID',
|
||||
clientSecret: 'APP_SECRET',
|
||||
callbackURL: 'http://localhost:3000/auth/google/callback'
|
||||
},
|
||||
linkedin: {
|
||||
clientID: 'APP_ID',
|
||||
clientSecret: 'APP_SECRET',
|
||||
callbackURL: 'http://localhost:3000/auth/linkedin/callback'
|
||||
}
|
||||
};
|
||||
@@ -10,56 +10,56 @@ var modulesJSFiles = utilities.walk('./public/modules', /(.*)\.(js)/, null, null
|
||||
|
||||
// Karma configuration
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
// Frameworks to use
|
||||
frameworks: ['jasmine'],
|
||||
config.set({
|
||||
// Frameworks to use
|
||||
frameworks: ['jasmine'],
|
||||
|
||||
// List of files / patterns to load in the browser
|
||||
files: [
|
||||
'public/lib/angular/angular.js',
|
||||
'public/lib/angular-mocks/angular-mocks.js',
|
||||
'public/lib/angular-cookies/angular-cookies.js',
|
||||
'public/lib/angular-resource/angular-resource.js',
|
||||
'public/lib/angular-route/angular-route.js',
|
||||
'public/lib/angular-bootstrap/ui-bootstrap.js',
|
||||
'public/lib/angular-ui-utils/ui-utils.js',
|
||||
'public/js/config.js',
|
||||
'public/js/application.js',
|
||||
].concat(modulesJSFiles),
|
||||
// List of files / patterns to load in the browser
|
||||
files: [
|
||||
'public/lib/angular/angular.js',
|
||||
'public/lib/angular-mocks/angular-mocks.js',
|
||||
'public/lib/angular-cookies/angular-cookies.js',
|
||||
'public/lib/angular-resource/angular-resource.js',
|
||||
'public/lib/angular-route/angular-route.js',
|
||||
'public/lib/angular-bootstrap/ui-bootstrap.js',
|
||||
'public/lib/angular-ui-utils/ui-utils.js',
|
||||
'public/js/config.js',
|
||||
'public/js/application.js',
|
||||
].concat(modulesJSFiles),
|
||||
|
||||
// Test results reporter to use
|
||||
// Possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
|
||||
//reporters: ['progress'],
|
||||
reporters: ['progress'],
|
||||
// Test results reporter to use
|
||||
// Possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
|
||||
//reporters: ['progress'],
|
||||
reporters: ['progress'],
|
||||
|
||||
// Web server port
|
||||
port: 9876,
|
||||
// Web server port
|
||||
port: 9876,
|
||||
|
||||
// Enable / disable colors in the output (reporters and logs)
|
||||
colors: true,
|
||||
// Enable / disable colors in the output (reporters and logs)
|
||||
colors: true,
|
||||
|
||||
// Level of logging
|
||||
// Possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
|
||||
logLevel: config.LOG_INFO,
|
||||
|
||||
// Enable / disable watching file and executing tests whenever any file changes
|
||||
autoWatch: true,
|
||||
// Level of logging
|
||||
// Possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
|
||||
logLevel: config.LOG_INFO,
|
||||
|
||||
// Start these browsers, currently available:
|
||||
// - Chrome
|
||||
// - ChromeCanary
|
||||
// - Firefox
|
||||
// - Opera
|
||||
// - Safari (only Mac)
|
||||
// - PhantomJS
|
||||
// - IE (only Windows)
|
||||
browsers: ['PhantomJS'],
|
||||
// Enable / disable watching file and executing tests whenever any file changes
|
||||
autoWatch: true,
|
||||
|
||||
// If browser does not capture in given timeout [ms], kill it
|
||||
captureTimeout: 60000,
|
||||
// Start these browsers, currently available:
|
||||
// - Chrome
|
||||
// - ChromeCanary
|
||||
// - Firefox
|
||||
// - Opera
|
||||
// - Safari (only Mac)
|
||||
// - PhantomJS
|
||||
// - IE (only Windows)
|
||||
browsers: ['PhantomJS'],
|
||||
|
||||
// Continuous Integration mode
|
||||
// If true, it capture browsers, run tests and exit
|
||||
singleRun: true
|
||||
});
|
||||
// If browser does not capture in given timeout [ms], kill it
|
||||
captureTimeout: 60000,
|
||||
|
||||
// Continuous Integration mode
|
||||
// If true, it capture browsers, run tests and exit
|
||||
singleRun: true
|
||||
});
|
||||
};
|
||||
112
package.json
112
package.json
@@ -1,58 +1,58 @@
|
||||
{
|
||||
"name": "meanjs",
|
||||
"description": "Full-Stack JavaScript with MongoDB, Express, AngularJS, and Node.js.",
|
||||
"version": "0.1.0",
|
||||
"private": false,
|
||||
"author": "https://github.com/meanjs/mean/graphs/contributors",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/meanjs/mean.git"
|
||||
},
|
||||
"engines": {
|
||||
"node": "0.10.x",
|
||||
"npm": "1.2.x"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "node node_modules/grunt-cli/bin/grunt",
|
||||
"test": "node node_modules/grunt-cli/bin/grunt test",
|
||||
"postinstall": "node node_modules/bower/bin/bower update"
|
||||
},
|
||||
"dependencies": {
|
||||
"express": "latest",
|
||||
"consolidate": "latest",
|
||||
"swig": "latest",
|
||||
"mongoose": "latest",
|
||||
"connect-mongo": "latest",
|
||||
"connect-flash": "latest",
|
||||
"crypto": "latest",
|
||||
"passport": "latest",
|
||||
"passport-local": "latest",
|
||||
"passport-facebook": "latest",
|
||||
"passport-twitter": "latest",
|
||||
"passport-linkedin": "latest",
|
||||
"passport-google-oauth": "latest",
|
||||
"lodash": "latest",
|
||||
"forever": "latest",
|
||||
"bower": "latest",
|
||||
"grunt": "latest",
|
||||
"grunt-cli": "latest",
|
||||
"grunt-env": "latest"
|
||||
},
|
||||
"devDependencies": {
|
||||
"supertest": "latest",
|
||||
"should": "latest",
|
||||
"grunt-node-inspector": "latest",
|
||||
"grunt-contrib-watch": "latest",
|
||||
"grunt-contrib-jshint": "latest",
|
||||
"grunt-nodemon": "latest",
|
||||
"grunt-concurrent": "latest",
|
||||
"grunt-mocha-test": "latest",
|
||||
"grunt-karma": "latest",
|
||||
"karma": "latest",
|
||||
"karma-jasmine": "latest",
|
||||
"karma-coverage": "latest",
|
||||
"karma-chrome-launcher": "latest",
|
||||
"karma-firefox-launcher": "latest",
|
||||
"karma-phantomjs-launcher": "latest"
|
||||
}
|
||||
"name": "meanjs",
|
||||
"description": "Full-Stack JavaScript with MongoDB, Express, AngularJS, and Node.js.",
|
||||
"version": "0.1.0",
|
||||
"private": false,
|
||||
"author": "https://github.com/meanjs/mean/graphs/contributors",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/meanjs/mean.git"
|
||||
},
|
||||
"engines": {
|
||||
"node": "0.10.x",
|
||||
"npm": "1.2.x"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "node node_modules/grunt-cli/bin/grunt",
|
||||
"test": "node node_modules/grunt-cli/bin/grunt test",
|
||||
"postinstall": "node node_modules/bower/bin/bower update"
|
||||
},
|
||||
"dependencies": {
|
||||
"express": "latest",
|
||||
"consolidate": "latest",
|
||||
"swig": "latest",
|
||||
"mongoose": "latest",
|
||||
"connect-mongo": "latest",
|
||||
"connect-flash": "latest",
|
||||
"crypto": "latest",
|
||||
"passport": "latest",
|
||||
"passport-local": "latest",
|
||||
"passport-facebook": "latest",
|
||||
"passport-twitter": "latest",
|
||||
"passport-linkedin": "latest",
|
||||
"passport-google-oauth": "latest",
|
||||
"lodash": "latest",
|
||||
"forever": "latest",
|
||||
"bower": "latest",
|
||||
"grunt": "latest",
|
||||
"grunt-cli": "latest",
|
||||
"grunt-env": "latest"
|
||||
},
|
||||
"devDependencies": {
|
||||
"supertest": "latest",
|
||||
"should": "latest",
|
||||
"grunt-node-inspector": "latest",
|
||||
"grunt-contrib-watch": "latest",
|
||||
"grunt-contrib-jshint": "latest",
|
||||
"grunt-nodemon": "latest",
|
||||
"grunt-concurrent": "latest",
|
||||
"grunt-mocha-test": "latest",
|
||||
"grunt-karma": "latest",
|
||||
"karma": "latest",
|
||||
"karma-jasmine": "latest",
|
||||
"karma-coverage": "latest",
|
||||
"karma-chrome-launcher": "latest",
|
||||
"karma-firefox-launcher": "latest",
|
||||
"karma-phantomjs-launcher": "latest"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user