Skip to content

Commit c4909af

Browse files
committed
Update to Angular 1.0.7, jQuery 2.0.3 and Bootstrap 3.0
1 parent 93b7699 commit c4909af

File tree

329 files changed

+65000
-7257
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

329 files changed

+65000
-7257
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ HTML, and let AngularJS take care of interpolation on the browser side._
1919

2020
## How to use angular-express-seed
2121

22-
Clone the angular-express-seed repository and start hacking!
22+
Clone the angular-express-seed repository, run `npm install` to grab the dependencies and start hacking!
2323

2424
### Running the app
2525

app.js

Lines changed: 33 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,57 @@
11

22
/**
3-
* Module dependencies.
3+
* Module dependencies
44
*/
55

66
var express = require('express'),
77
routes = require('./routes'),
8-
api = require('./routes/api');
8+
api = require('./routes/api'),
9+
http = require('http'),
10+
path = require('path');
11+
912

1013
var app = module.exports = express();
1114

12-
// Configuration
15+
/**
16+
* Configuration
17+
*/
18+
19+
// all environments
20+
app.set('port', process.env.PORT || 3000);
21+
app.set('views', __dirname + '/views');
22+
app.set('view engine', 'jade');
23+
app.use(express.logger('dev'));
24+
app.use(express.bodyParser());
25+
app.use(express.methodOverride());
26+
app.use(express.static(path.join(__dirname, 'public')));
27+
app.use(app.router);
1328

14-
app.configure(function(){
15-
app.set('views', __dirname + '/views');
16-
app.set('view engine', 'jade');
17-
app.use(express.bodyParser());
18-
app.use(express.methodOverride());
19-
app.use(express.static(__dirname + '/public'));
20-
app.use(app.router);
21-
});
29+
// development only
30+
if (app.get('env') === 'development') {
31+
app.use(express.errorHandler());
32+
};
2233

23-
app.configure('development', function(){
24-
app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
25-
});
34+
// production only
35+
if (app.get('env') === 'production') {
36+
// TODO
37+
};
2638

27-
app.configure('production', function(){
28-
app.use(express.errorHandler());
29-
});
3039

31-
// Routes
3240

41+
// Routes
3342
app.get('/', routes.index);
3443
app.get('/partial/:name', routes.partial);
3544

3645
// JSON API
37-
3846
app.get('/api/name', api.name);
3947

4048
// redirect all others to the index (HTML5 history)
4149
app.get('*', routes.index);
4250

43-
// Start server
51+
/**
52+
* Start Server
53+
*/
4454

45-
app.listen(3000, function(){
46-
console.log("Server started");
47-
});
55+
http.createServer(app).listen(app.get('port'), function () {
56+
console.log('Express server listening on port ' + app.get('port'));
57+
});

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"name": "application-name"
3-
, "version": "0.0.1"
4-
, "private": true
5-
, "dependencies": {
6-
"express": "3.0.0"
7-
, "jade": ">= 0.0.1"
8-
}
2+
"name": "application-name",
3+
"version": "0.0.1",
4+
"private": true,
5+
"dependencies": {
6+
"express": "~3.2.6",
7+
"jade": "~0.31.2"
8+
}
99
}

0 commit comments

Comments
 (0)