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

fixes db deployment issue on heroku. production db value needs to be set... #1

Merged
merged 19 commits into from
Mar 27, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[![MEAN.JS Logo](http://meanjs.org/img/logo-small.png)](http://meanjs.org/)

[![Build Status](https://travis-ci.org/meanjs/mean.png?branch=master)](https://travis-ci.org/meanjs/mean)

MEAN.JS is a full-stack JavaScript open-source solution, which provides a solid starting point for [MongoDB](http://www.mongodb.org/), [Node.js](http://www.nodejs.org/), [Express](http://expressjs.com/), and [AngularJS](http://angularjs.org/) based applications. The idea is to solve the common issues with connecting those frameworks, build a robust framework to support daily development needs, and help developers use better practices while working with popular JavaScript components.

## Before You Begin
Expand Down
2 changes: 1 addition & 1 deletion app/views/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends 'layout.html' %}

{% block content %}
<section data-ng-view></section>
<section data-ui-view></section>
{% endblock %}
14 changes: 10 additions & 4 deletions app/views/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<meta name="keywords" content="{{keywords}}">
<meta name="description" content="{{description}}">

<!-- Social META -->
<!-- Facebook META -->
<meta property="fb:app_id" content="{{facebookAppId}}">
<meta property="og:site_name" content="{{title}}">
<meta property="og:title" content="{{title}}">
Expand All @@ -23,6 +23,12 @@
<meta property="og:image" content="/img/brand/logo.png">
<meta property="og:type" content="website">

<!-- Twitter META -->
<meta name="twitter:title" content="{{title}}">
<meta name="twitter:description" content="{{description}}">
<meta name="twitter:url" content="{{url}}">
<meta name="twitter:image" content="/img/brand/logo.png">

<!-- Fav Icon -->
<link href="/img/brand/favicon.ico" rel="shortcut icon" type="image/x-icon">

Expand All @@ -43,8 +49,8 @@
<![endif]-->
</head>

<body>
<header data-ng-include="'/modules/core/views/header.html'" class="navbar navbar-fixed-top navbar-inverse ng-cloak"></header>
<body class="ng-cloak">
<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 %}
Expand All @@ -58,14 +64,14 @@

<!--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>
<script type="text/javascript" src="/lib/angular-ui-router/release/angular-ui-router.js"></script>

<!--AngularJS Application Init-->
<script type="text/javascript" src="/js/config.js"></script>
Expand Down
20 changes: 10 additions & 10 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "meanjs",
"version": "0.2.0",
"version": "0.2.1",
"description": "Fullstack JavaScript with MongoDB, Express, AngularJS, and Node.js.",
"dependencies": {
"bootstrap": "latest",
"angular": "latest",
"angular-route": "latest",
"angular-cookies": "latest",
"angular-resource": "latest",
"angular-animate": "latest",
"angular-mocks": "latest",
"angular-bootstrap": "latest",
"angular-ui-utils": "latest"
"bootstrap": "~3",
"angular": "~1.2",
"angular-cookies": "~1.2",
"angular-resource": "~1.2",
"angular-animate": "~1.2",
"angular-mocks": "~1.2",
"angular-bootstrap": "~0.10.0",
"angular-ui-utils": "~0.1.0",
"angular-ui-router": "~0.2.9"
}
}
1 change: 0 additions & 1 deletion config/env/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ module.exports = {
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,
templateEngine: 'swig',
Expand Down
2 changes: 1 addition & 1 deletion config/env/production.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

module.exports = {
db: 'mongodb://localhost/mean',
db: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI,
facebook: {
clientID: 'APP_ID',
clientSecret: 'APP_SECRET',
Expand Down
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ module.exports = function(config) {
'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/lib/angular-ui-router/release/angular-ui-router.js',
'public/js/config.js',
'public/js/application.js',
].concat(modulesJSFiles),
Expand Down
76 changes: 37 additions & 39 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "meanjs",
"description": "Full-Stack JavaScript with MongoDB, Express, AngularJS, and Node.js.",
"version": "0.1.0",
"version": "0.2.1",
"private": false,
"author": "https://github.com/meanjs/mean/graphs/contributors",
"repository": {
Expand All @@ -10,49 +10,47 @@
},
"engines": {
"node": "0.10.x",
"npm": "1.2.x"
"npm": "1.4.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"
"start": "grunt",
"test": "grunt test",
"postinstall": "bower install"
},
"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"
"express": "~3.4.8",
"consolidate": "~0.10.0",
"swig": "~1.3.2",
"mongoose": "~3.8.8",
"connect-mongo": "~0.4.0",
"connect-flash": "~0.1.1",
"passport": "~0.2.0",
"passport-local": "~0.1.6",
"passport-facebook": "~1.0.2",
"passport-twitter": "~1.0.2",
"passport-linkedin": "~0.1.3",
"passport-google-oauth": "~0.1.5",
"lodash": "~2.4.1",
"forever": "~0.10.11",
"bower": "~1.2.8",
"grunt-cli": "~0.1.13"
},
"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"
"supertest": "~0.9.0",
"should": "~3.1.3",
"grunt-env": "~0.4.1",
"grunt-node-inspector": "~0.1.3",
"grunt-contrib-watch": "~0.5.3",
"grunt-contrib-jshint": "~0.8.0",
"grunt-nodemon": "~0.2.0",
"grunt-concurrent": "~0.4.3",
"grunt-mocha-test": "~0.9.4",
"grunt-karma": "~0.7.2",
"karma": "~0.11.0",
"karma-jasmine": "~0.2.1",
"karma-coverage": "~0.2.0",
"karma-chrome-launcher": "~0.1.2",
"karma-firefox-launcher": "~0.1.3",
"karma-phantomjs-launcher": "~0.1.2"
}
}
22 changes: 4 additions & 18 deletions public/css/common.css
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
body {
padding-top:50px;
.content {
margin-top: 50px;
}

a.undecorated-link:hover {
text-decoration: none;
}

footer {
position:fixed;
left:0px;
bottom:0px;
height:30px;
width:100%;
background:#ddd;
-webkit-box-shadow:0 8px 6px 6px black;
-moz-box-shadow:0 8px 6px 6px black;
box-shadow:0 8px 6px 6px black
}

footer p {
padding:5px 0 12px 10px
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
display: none !important;
}
4 changes: 2 additions & 2 deletions public/js/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
var ApplicationConfiguration = (function() {
// Init module configuration options
var applicationModuleName = 'mean';
var applicationModuleVendorDependencies = ['ngRoute', 'ngResource', 'ngCookies', 'ngAnimate', 'ui.bootstrap', 'ui.utils'];
var applicationModuleVendorDependencies = ['ngResource', 'ngCookies', 'ngAnimate', 'ui.router', 'ui.bootstrap', 'ui.utils'];

// Add a new vertical module
var registerModule = function(moduleName) {
Expand All @@ -20,4 +20,4 @@ var ApplicationConfiguration = (function() {
applicationModuleVendorDependencies: applicationModuleVendorDependencies,
registerModule: registerModule
};
})();
})();
37 changes: 21 additions & 16 deletions public/modules/articles/config/routes.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
'use strict';

//Setting up route
angular.module('mean.articles').config(['$routeProvider',
function($routeProvider) {
$routeProvider.
when('/articles', {
templateUrl: 'modules/articles/views/list.html'
}).
when('/articles/create', {
templateUrl: 'modules/articles/views/create.html'
}).
when('/articles/:articleId', {
templateUrl: 'modules/articles/views/view.html'
}).
when('/articles/:articleId/edit', {
templateUrl: 'modules/articles/views/edit.html'
});
}
angular.module('mean.articles').config(['$stateProvider',
function($stateProvider) {
// Articles state routing
$stateProvider.
state('listArticles', {
url: '/articles',
templateUrl: 'modules/articles/views/list.html'
}).
state('createArticle', {
url: '/articles/create',
templateUrl: 'modules/articles/views/create.html'
}).
state('viewArticle', {
url: '/articles/:articleId',
templateUrl: 'modules/articles/views/view.html'
}).
state('editArticle', {
url: '/articles/:articleId/edit',
templateUrl: 'modules/articles/views/edit.html'
});
}
]);
6 changes: 3 additions & 3 deletions public/modules/articles/controllers/articles.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

angular.module('mean.articles').controller('ArticlesController', ['$scope', '$routeParams', '$location', 'Authentication', 'Articles',
function($scope, $routeParams, $location, Authentication, Articles) {
angular.module('mean.articles').controller('ArticlesController', ['$scope', '$stateParams', '$location', 'Authentication', 'Articles',
function($scope, $stateParams, $location, Authentication, Articles) {
$scope.authentication = Authentication;

$scope.create = function() {
Expand Down Expand Up @@ -53,7 +53,7 @@ angular.module('mean.articles').controller('ArticlesController', ['$scope', '$ro

$scope.findOne = function() {
Articles.get({
articleId: $routeParams.articleId
articleId: $stateParams.articleId
}, function(article) {
$scope.article = article;
});
Expand Down
8 changes: 4 additions & 4 deletions public/modules/articles/tests/articles.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
var ArticlesController,
scope,
$httpBackend,
$routeParams,
$stateParams,
$location;

// The $resource service augments the response object with methods for updating and deleting the resource.
Expand Down Expand Up @@ -36,12 +36,12 @@
// The injector ignores leading and trailing underscores here (i.e. _$httpBackend_).
// This allows us to inject a service but then attach it to a variable
// with the same name as the service.
beforeEach(inject(function($controller, $rootScope, _$location_, _$routeParams_, _$httpBackend_) {
beforeEach(inject(function($controller, $rootScope, _$location_, _$stateParams_, _$httpBackend_) {
// Set a new global scope
scope = $rootScope.$new();

// Point global variables to injected services
$routeParams = _$routeParams_;
$stateParams = _$stateParams_;
$httpBackend = _$httpBackend_;
$location = _$location_;

Expand Down Expand Up @@ -80,7 +80,7 @@
});

// Set the URL parameter
$routeParams.articleId = '525a8422f6d0f87f0e407a33';
$stateParams.articleId = '525a8422f6d0f87f0e407a33';

// Set GET response
$httpBackend.expectGET(/articles\/([0-9a-fA-F]{24})$/).respond(sampleArticle);
Expand Down
19 changes: 12 additions & 7 deletions public/modules/core/config/routes.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
'use strict';

// Setting up route
angular.module('mean.core').config(['$routeProvider',
function($routeProvider) {
$routeProvider.
when('/', {
templateUrl: 'modules/core/views/home.html'
});
}
angular.module('mean.core').config(['$stateProvider', '$urlRouterProvider',
function($stateProvider, $urlRouterProvider) {
// Redirect to home view when route not found
$urlRouterProvider.otherwise('/');

// Home state routing
$stateProvider.
state('home', {
url: '/',
templateUrl: 'modules/core/views/home.html'
});
}
]);
Loading