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

Commit 3688970

Browse files
committed
Adding Bower Support
1 parent c30d667 commit 3688970

23 files changed

+45
-1867
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.DS_Store
22
node_modules/
3+
public/lib

README.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,39 @@ We mainly try to take care of the connection points between existing popular fra
99
* MongoDB - Download and Install [MongoDB](http://www.mongodb.org/) - Make sure it's running on the default port(27017).
1010

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

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

21-
## Quick Start
21+
## Quick Install
2222

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

25-
Install dependencies:
25+
Install npm dependencies:
26+
27+
$ npm install
28+
29+
Install bower dependencies:
2630

2731
$ npm install
2832

2933
Start the server:
3034

3135
$ node server
3236

37+
## Getting Started
38+
We pre-included an article example, check it out:
39+
* [The Model](app/models/article.js) - Where we define our object schema.
40+
* [The Controller](app/controllers/articles.js) - Where we take care of our backend logic.
41+
* [The AngularJs Service](public/js/services/articles.js) - Where we connect to our REST service.
42+
* [The AngularJs Controller](public/js/controllers/articles.js) - Where we take care of our frontend logic.
43+
* [The AngularJs Views Folder](public/views/articles) - Where we keep our CRUD views.
44+
3345
## The Future
3446
We are currently working on a extendable module system to make it more like a framework with support for modern web development requirements.
3547

app/views/includes/foot.jade

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
1-
footer
2-
p Powered and developed by our <a href="http://meanleanstartupmachine.com">MEAN Ninjas</a>
3-
script(type='text/javascript', src='//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js')
1+
<footer>
2+
אתר קהילת אנגולר ישראל מבוסס על http://mean.io
3+
</footer>
4+
script(type='text/javascript', src='lib/jquery/jquery.js')
45

5-
script(type='text/javascript', src='js/lib/bootstrap.min.js')
6-
script(type='text/javascript', src='js/lib/bootstrap-datepicker.js')
7-
script(type='text/javascript', src='js/lib/angular.min.js')
8-
script(type='text/javascript', src='js/lib/angular-cookies.min.js')
9-
script(type='text/javascript', src='js/lib/angular-resource.min.js')
10-
script(type='text/javascript', src='js/lib/angular-strap.min.js')
6+
script(type='text/javascript', src='lib/angular/angular.js')
7+
script(type='text/javascript', src='lib/angular-cookies/angular-cookies.js')
8+
script(type='text/javascript', src='lib/angular-resource/angular-resource.js')
9+
script(type='text/javascript', src='lib/angular-bootstrap/ui-bootstrap-tpls.js')
1110

1211
script(type='text/javascript', src='js/app.js')
1312
script(type='text/javascript', src='js/config.js')
1413
script(type='text/javascript', src='js/directives.js')
1514
script(type='text/javascript', src='js/filters.js')
1615

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

19+
script(type='text/javascript', src='js/controllers/articles.js')
1920
script(type='text/javascript', src='js/controllers/index.js')
2021
script(type='text/javascript', src='js/controllers/header.js')
2122
script(type='text/javascript', src='js/init.js')

app/views/includes/head.jade

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ head
1919
meta(property='og:site_name', content='MEAN - A Modern Stack')
2020
meta(property='fb:admins', content='APP_ADMIN')
2121

22-
link(rel='stylesheet', href='/css/lib/bootstrap.min.css')
23-
link(rel='stylesheet', href='/css/lib/bootstrap-responsive.min.css')
24-
link(rel='stylesheet', href='/css/lib/bootstrap-datepicker.css')
22+
link(rel='stylesheet', href='/lib/bootstrap/docs/assets/css/bootstrap.css')
23+
link(rel='stylesheet', href='/lib/bootstrap/docs/assets/css/bootstrap-responsive.css')
2524
link(rel='stylesheet', href='/css/common.css')
2625

2726
link(rel='stylesheet', href='/css/views/index.css')

config/routes.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ module.exports = function (app, passport, auth) {
2323

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

26+
var articles = require('../app/controllers/articles')
27+
app.get('/articles', articles.all)
28+
app.post('/articles', auth.requiresLogin, articles.create)
29+
app.get('/articles/:articleId', articles.show)
30+
app.put('/articles/:articleId', auth.requiresLogin, auth.article.hasAuthorization, articles.update)
31+
app.del('/articles/:articleId', auth.requiresLogin, auth.article.hasAuthorization, articles.destroy)
32+
33+
app.param('articleId', articles.article)
2634

2735
// home route
2836
var index = require('../app/controllers/index')

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
, "view-helpers": "latest"
3333
, "forever": "latest"
3434
, "mean-logger": "latest"
35+
, "bower": "latest"
3536
}
3637
, "devDependencies": {
3738
"supertest": "latest"

public/crossdomain.xml

Lines changed: 0 additions & 15 deletions
This file was deleted.

public/css/lib/bootstrap-datepicker.css

Lines changed: 0 additions & 182 deletions
This file was deleted.

public/css/lib/bootstrap-responsive.min.css

Lines changed: 0 additions & 9 deletions
This file was deleted.

public/css/lib/bootstrap.min.css

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)