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

Commit

Permalink
Adding Bower Support
Browse files Browse the repository at this point in the history
  • Loading branch information
amoshaviv committed Jul 9, 2013
1 parent c30d667 commit 3688970
Show file tree
Hide file tree
Showing 23 changed files with 45 additions and 1,867 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.DS_Store
node_modules/
public/lib
26 changes: 19 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,39 @@ We mainly try to take care of the connection points between existing popular fra
* MongoDB - Download and Install [MongoDB](http://www.mongodb.org/) - Make sure it's running on the default port(27017).

## Additional Packages
* Express - Defined as npm module in the [Package.json](package.json) file.
* Mongoose - Defined as npm module in the [Package.json](package.json) file.
* Passport - Defined as npm module in the [Package.json](package.json) file.
* AngularJS - Pre-bundled in the [public](public/) folder.
* Twitter Bootstrap - Pre-bundled in the [public](public/) folder.
* Express - Defined as npm module in the [package.json](package.json) file.
* Mongoose - Defined as npm module in the [package.json](package.json) file.
* Passport - Defined as npm module in the [package.json](package.json) file.
* AngularJS - Defined as bower module in the [bower.json](bower.json) file.
* Twitter Bootstrap - Defined as bower module in the [bower.json](bower.json) file.

## Configuration
See the [config](config/) folder and especially the [config.js](config/config.js) file.

## Quick Start
## Quick Install

The quickest way to get started with MEAN is to clone the project and utilize it like this:

Install dependencies:
Install npm dependencies:

$ npm install

Install bower dependencies:

$ npm install

Start the server:

$ node server

## Getting Started
We pre-included an article example, check it out:
* [The Model](app/models/article.js) - Where we define our object schema.
* [The Controller](app/controllers/articles.js) - Where we take care of our backend logic.
* [The AngularJs Service](public/js/services/articles.js) - Where we connect to our REST service.
* [The AngularJs Controller](public/js/controllers/articles.js) - Where we take care of our frontend logic.
* [The AngularJs Views Folder](public/views/articles) - Where we keep our CRUD views.

## The Future
We are currently working on a extendable module system to make it more like a framework with support for modern web development requirements.

Expand Down
19 changes: 10 additions & 9 deletions app/views/includes/foot.jade
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
footer
p Powered and developed by our <a href="http://meanleanstartupmachine.com">MEAN Ninjas</a>
script(type='text/javascript', src='//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js')
<footer>
אתר קהילת אנגולר ישראל מבוסס על http://mean.io
</footer>
script(type='text/javascript', src='lib/jquery/jquery.js')

script(type='text/javascript', src='js/lib/bootstrap.min.js')
script(type='text/javascript', src='js/lib/bootstrap-datepicker.js')
script(type='text/javascript', src='js/lib/angular.min.js')
script(type='text/javascript', src='js/lib/angular-cookies.min.js')
script(type='text/javascript', src='js/lib/angular-resource.min.js')
script(type='text/javascript', src='js/lib/angular-strap.min.js')
script(type='text/javascript', src='lib/angular/angular.js')
script(type='text/javascript', src='lib/angular-cookies/angular-cookies.js')
script(type='text/javascript', src='lib/angular-resource/angular-resource.js')
script(type='text/javascript', src='lib/angular-bootstrap/ui-bootstrap-tpls.js')

script(type='text/javascript', src='js/app.js')
script(type='text/javascript', src='js/config.js')
script(type='text/javascript', src='js/directives.js')
script(type='text/javascript', src='js/filters.js')

script(type='text/javascript', src='js/services/global.js')
script(type='text/javascript', src='js/services/articles.js')

script(type='text/javascript', src='js/controllers/articles.js')
script(type='text/javascript', src='js/controllers/index.js')
script(type='text/javascript', src='js/controllers/header.js')
script(type='text/javascript', src='js/init.js')
5 changes: 2 additions & 3 deletions app/views/includes/head.jade
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ head
meta(property='og:site_name', content='MEAN - A Modern Stack')
meta(property='fb:admins', content='APP_ADMIN')

link(rel='stylesheet', href='/css/lib/bootstrap.min.css')
link(rel='stylesheet', href='/css/lib/bootstrap-responsive.min.css')
link(rel='stylesheet', href='/css/lib/bootstrap-datepicker.css')
link(rel='stylesheet', href='/lib/bootstrap/docs/assets/css/bootstrap.css')
link(rel='stylesheet', href='/lib/bootstrap/docs/assets/css/bootstrap-responsive.css')
link(rel='stylesheet', href='/css/common.css')

link(rel='stylesheet', href='/css/views/index.css')
Expand Down
8 changes: 8 additions & 0 deletions config/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ module.exports = function (app, passport, auth) {

app.param('userId', users.user)

var articles = require('../app/controllers/articles')
app.get('/articles', articles.all)
app.post('/articles', auth.requiresLogin, articles.create)
app.get('/articles/:articleId', articles.show)
app.put('/articles/:articleId', auth.requiresLogin, auth.article.hasAuthorization, articles.update)
app.del('/articles/:articleId', auth.requiresLogin, auth.article.hasAuthorization, articles.destroy)

app.param('articleId', articles.article)

// home route
var index = require('../app/controllers/index')
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
, "view-helpers": "latest"
, "forever": "latest"
, "mean-logger": "latest"
, "bower": "latest"
}
, "devDependencies": {
"supertest": "latest"
Expand Down
15 changes: 0 additions & 15 deletions public/crossdomain.xml

This file was deleted.

182 changes: 0 additions & 182 deletions public/css/lib/bootstrap-datepicker.css

This file was deleted.

9 changes: 0 additions & 9 deletions public/css/lib/bootstrap-responsive.min.css

This file was deleted.

9 changes: 0 additions & 9 deletions public/css/lib/bootstrap.min.css

This file was deleted.

4 changes: 4 additions & 0 deletions public/js/config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
//Setting up route
window.app.config(['$routeProvider', function($routeProvider) {
$routeProvider.
when('/articles', { templateUrl: 'views/articles/list.html' }).
when('/articles/create', { templateUrl: 'views/articles/create.html' }).
when('/articles/:articleId/edit', { templateUrl: 'views/articles/edit.html' }).
when('/articles/:articleId', { templateUrl: 'views/articles/view.html' }).
when('/', { templateUrl: 'views/index.html' }).
otherwise({redirectTo: '/'});
}]);
Expand Down
Loading

0 comments on commit 3688970

Please sign in to comment.