Closed jasonbrooks closed 10 years ago
@jasonbrooks good catch with the filenames there... There's some funny business going on though. So for the original project (https://github.com/fzaninotto/uptime), the main file is 'app.js' and there's the (unchanged) line is in the package.json:
"scripts": { "test": "node_modules/.bin/mocha test/lib/", "start": "node app.js" }
When I got this running on OpenShift Online, I just changed the name of app.js to server.js, but I didn't modify the package.json... and it still works fine for me with this configuration (one click deploy from https://www.openshift.com/quickstarts/uptime yields a running app)
Now, I'm a bit confused why this works. Technically, if OpenShift reads the package.json, the app shouldn't start up because it would look for app.js, which doesn't exist. It looks like Openshift is just looking for a server.js and is ignoring the package.json...
How are you running it on OpenShift? Did you use the quickstart?
I installed it on an openshift enterprise instance, through the web console, using your quickstart repo as the initial source. Maybe that caused some differences On Jan 9, 2014 2:41 PM, ronak notifications@github.com wrote:@jasonbrooks good catch with the filenames there... There's some funny business going on though. So for the original project (https://github.com/fzaninotto/uptime), the main file is 'app.js' and there's the (unchanged) line is in the package.json:
"scripts": { "test": "node_modules/.bin/mocha test/lib/", "start": "node app.js" }
When I got this running on OpenShift Online, I just changed the name of app.js to server.js, but I didn't modify the package.json... and it still works fine for me with this configuration (one click deploy from https://www.openshift.com/quickstarts/uptime yields a running app)
Now, I'm a bit confused why this works. Technically, if OpenShift reads the package.json, the app shouldn't start up because it would look for app.js, which doesn't exist. It looks like Openshift is just looking for a server.js and is ignoring the package.json...
How are you running it on OpenShift? Did you use the quickstart?
—Reply to this email directly or view it on GitHub.
i'm having the same problem. it looks like openshift is completely ignoring my package.json file's main and scripts declarations. the only thing i could do to get my app running was log on to the server and run node manually in the app-root/repo.
is there a way to get this working automatically so that package.json does the trick?
here is what i have in package.json
{
"name": "yo-ff-app",
"version": "0.0.0",
"main": "server/app.js",
"dependencies": {
"express": "~4.0.0",
"morgan": "~1.0.0",
"body-parser": "~1.0.0",
"method-override": "~1.0.0",
"static-favicon": "~1.0.1",
"cookie-parser": "~1.0.1",
"express-session": "~1.0.2",
"errorhandler": "~1.0.0",
"compression": "~1.0.1",
"lodash": "~2.4.1",
"jade": "~1.2.0",
"mongoose": "~3.8.8",
"jsonwebtoken": "^0.3.0",
"express-jwt": "^0.1.3",
"passport": "~0.2.0",
"passport-local": "~0.1.6",
"passport-facebook": "latest",
"passport-twitter": "latest",
"passport-google-oauth": "latest",
"composable-middleware": "^0.3.0",
"connect-mongo": "^0.4.1",
"socket.io": "~0.9.16",
"socketio-jwt": "^2.0.2"
},
"devDependencies": {
"grunt": "~0.4.4",
"grunt-autoprefixer": "~0.7.2",
"grunt-bower-install": "~1.4.0",
"grunt-concurrent": "~0.5.0",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-compass": "~0.7.2",
"grunt-contrib-concat": "~0.4.0",
"grunt-contrib-copy": "~0.5.0",
"grunt-contrib-cssmin": "~0.9.0",
"grunt-contrib-htmlmin": "~0.2.0",
"grunt-contrib-imagemin": "~0.7.1",
"grunt-contrib-jshint": "~0.10.0",
"grunt-contrib-uglify": "~0.4.0",
"grunt-contrib-watch": "~0.6.1",
"grunt-contrib-coffee": "^0.10.1",
"grunt-contrib-jade": "^0.11.0",
"grunt-contrib-less": "^0.11.0",
"grunt-google-cdn": "~0.4.0",
"grunt-newer": "~0.7.0",
"grunt-ngmin": "~0.0.3",
"grunt-rev": "~0.1.0",
"grunt-svgmin": "~0.4.0",
"grunt-usemin": "~2.1.1",
"grunt-env": "~0.4.1",
"grunt-node-inspector": "~0.1.5",
"grunt-nodemon": "~0.2.0",
"grunt-angular-templates": "^0.5.4",
"grunt-dom-munger": "^3.4.0",
"grunt-protractor-runner": "^0.2.4",
"grunt-asset-injector": "^0.1.0",
"grunt-karma": "~0.8.2",
"grunt-mocha-test": "~0.10.2",
"grunt-contrib-sass": "^0.7.3",
"jit-grunt": "^0.5.0",
"time-grunt": "~0.3.1",
"grunt-express-server": "~0.4.17",
"grunt-open": "~0.2.3",
"open": "~0.0.4",
"jshint-stylish": "~0.1.5",
"connect-livereload": "~0.4.0",
"karma-ng-scenario": "~0.1.0",
"karma-firefox-launcher": "~0.1.3",
"karma-script-launcher": "~0.1.0",
"karma-html2js-preprocessor": "~0.1.0",
"karma-ng-jade2js-preprocessor": "^0.1.2",
"karma-jasmine": "~0.1.5",
"karma-chrome-launcher": "~0.1.3",
"requirejs": "~2.1.11",
"karma-requirejs": "~0.2.1",
"karma-coffee-preprocessor": "~0.2.1",
"karma-jade-preprocessor": "0.0.11",
"karma-phantomjs-launcher": "~0.1.4",
"karma": "~0.12.9",
"karma-ng-html2js-preprocessor": "~0.1.0",
"supertest": "~0.11.0",
"should": "~3.3.1"
},
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"start": "node server/app.js",
"test": "grunt test",
"update-webdriver": "node node_modules/grunt-protractor-runner/node_modules/protractor/bin/webdriver-manager update"
},
"private": true
}
I just got this running in openshift, but I had to swap out app.js for server.js toward the bottom of package.json before it'd run.