Skip to content

Commit

Permalink
updated stackato
Browse files Browse the repository at this point in the history
  • Loading branch information
jonniespratley committed Jan 18, 2015
1 parent 3463a78 commit cbea63d
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 5 deletions.
Binary file modified app/.DS_Store
Binary file not shown.
22 changes: 17 additions & 5 deletions manifest.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
---
applications:
- name: angular-cms
command: node server.js
buildpack: https://github.com/cloudfoundry/heroku-buildpack-nodejs.git
name: angular-cms
framework: node
instances: 1
mem: 256
processes:
web: node server.js
ignores: ['.git', 'node_modules', 'app/bower_components']
hooks:
# pre-push:
#- gulp test
pre-staging:
- bower install
- grunt
# post-staging:
#- python manage.py syncdb --noinput
# pre-running:
#- python prerunsetup.py
12 changes: 12 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,17 @@ var fs = require('fs');
var cmsRouter = require('./routes/cms-router.js');
var app = express();
var config = JSON.parse(fs.readFileSync('./config/config.json'));

//Test if services
if(process.env.VCAP_SERVICES){
var cloudServices = JSON.parse(process.env.VCAP_SERVICES);

console.warn('cloud services', cloudServices);
//var dbcreds = services['mongodb'][0].credentials;
}
var port = process.env.PORT || 1339;
var host = process.env.VCAP_APP_HOST || "127.0.0.1";
config.host = host;
config.port = port;
var server = new cmsRouter.mount(config, app);
console.log(server);

0 comments on commit cbea63d

Please sign in to comment.