Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed some outdated module issues and updated angular to v1.2.22 #31

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.idea
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/angular-express-seed.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/jsLibraryMappings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions .idea/libraries/angular_express_seed_node_modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/scopes/scope_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

392 changes: 392 additions & 0 deletions .idea/workspace.xml

Large diffs are not rendered by default.

89 changes: 40 additions & 49 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,66 +1,57 @@

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

var express = require('express'),
bodyParser = require('body-parser'),
methodOverride = require('method-override'),
errorHandler = require('error-handler'),
morgan = require('morgan'),
routes = require('./routes'),
api = require('./routes/api'),
http = require('http'),
path = require('path');

var app = module.exports = express();
bodyParser = require('body-parser'),
methodOverride = require('method-override'),
errorHandler = require('express-error-handler'),
morgan = require('morgan'),
http = require('http'),
path = require('path');
lessMiddleware = require('less-middleware');

/*** VARs ***/
var app = express();
var port = 3001;

/**
* Configuration
*/
/*** Configuration ***/

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

var env = process.env.NODE_ENV || 'development';

// development only
if (env === 'development') {
app.use(express.errorHandler());
}
app.use(lessMiddleware(path.join(__dirname + '/public')));
app.use(express.static(path.join(__dirname + '/public')));
app.use(errorHandler());

// production only
if (env === 'production') {
// TODO
}

/*** Routes ***/

/**
* Routes
*/

// serve index and view partials
app.get('/', routes.index);
app.get('/partials/:name', routes.partials);

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

app.get('/', function(req,res) {
res.render('index');
});
app.get('/client', function(req,res) {
res.render('client');
});
app.get('/partials/:name', function(req,res){
var name = req.params.name;
res.render('partials/' + name);
});
// redirect all others to the index (HTML5 history)
app.get('*', routes.index);

app.get('*', function(req,res) {
res.render('index');
});
// JSON API
app.get('/api/name', function (req, res) {
res.json({
name: 'Bob'
});
});

/**
* Start Server
*/
/*** HTTP Server ***/

http.createServer(app).listen(app.get('port'), function () {
console.log('Express server listening on port ' + app.get('port'));
app.listen(port, function(){
console.log('HTTP Server listening on port '+ port);
});
15 changes: 15 additions & 0 deletions node_modules/.bin/jade

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions node_modules/.bin/jade.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions node_modules/body-parser/.npmignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

155 changes: 155 additions & 0 deletions node_modules/body-parser/HISTORY.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions node_modules/body-parser/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading