Skip to content

Commit

Permalink
Update to Angular 1.0.7, jQuery 2.0.3 and Bootstrap 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jimakker committed Aug 20, 2013
1 parent 93b7699 commit c4909af
Show file tree
Hide file tree
Showing 329 changed files with 65,000 additions and 7,257 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ HTML, and let AngularJS take care of interpolation on the browser side._

## How to use angular-express-seed

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

### Running the app

Expand Down
56 changes: 33 additions & 23 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,47 +1,57 @@

/**
* Module dependencies.
* Module dependencies
*/

var express = require('express'),
routes = require('./routes'),
api = require('./routes/api');
api = require('./routes/api'),
http = require('http'),
path = require('path');


var app = module.exports = express();

// Configuration
/**
* Configuration
*/

// all environments
app.set('port', process.env.PORT || 3000);
app.set('views', __dirname + '/views');
app.set('view engine', 'jade');
app.use(express.logger('dev'));
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(express.static(path.join(__dirname, 'public')));
app.use(app.router);

app.configure(function(){
app.set('views', __dirname + '/views');
app.set('view engine', 'jade');
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(express.static(__dirname + '/public'));
app.use(app.router);
});
// development only
if (app.get('env') === 'development') {
app.use(express.errorHandler());
};

app.configure('development', function(){
app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
});
// production only
if (app.get('env') === 'production') {
// TODO
};

app.configure('production', function(){
app.use(express.errorHandler());
});

// Routes

// Routes
app.get('/', routes.index);
app.get('/partial/:name', routes.partial);

// JSON API

app.get('/api/name', api.name);

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

// Start server
/**
* Start Server
*/

app.listen(3000, function(){
console.log("Server started");
});
http.createServer(app).listen(app.get('port'), function () {
console.log('Express server listening on port ' + app.get('port'));
});
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "application-name"
, "version": "0.0.1"
, "private": true
, "dependencies": {
"express": "3.0.0"
, "jade": ">= 0.0.1"
}
"name": "application-name",
"version": "0.0.1",
"private": true,
"dependencies": {
"express": "~3.2.6",
"jade": "~0.31.2"
}
}
Loading

0 comments on commit c4909af

Please sign in to comment.