I recently started using Openshift and it's been great so far. My current problem lies on the fact that my debug logs are not showing in Openshift's logs. I used to run the app locally with DEBUG=*,-express:* node ./bin/www and it showed everything I needed. So far I haven't figured how to translate this into the package.json file so that it works as intended.
package.json
{
"name": "APP",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "DEBUG=*,-express:* node ./bin/www"
},
"main": "./bin/www",
"dependencies": { ... }
It seems to me that it is running the node command with the main data, instead of my much preferred script. I believe that the debug module is a great alternative to spamming console.log() on my code.
On the OpenShift log files it shows the following when starting the app. It is my understanding I am looking to find the --exec and change.
DEBUG: Running node-supervisor with
DEBUG: program './bin/www'
DEBUG: --watch '/var/lib/openshift/<app_ID>/app-root/data/.nodewatch'
DEBUG: --ignore 'undefined'
DEBUG: --extensions 'node|js|coffee'
DEBUG: --exec 'node'
DEBUG: Starting child process with 'node ./bin/www'
Aucun commentaire:
Enregistrer un commentaire