{"action":"created","issue":{"url":"https://api.github.com/repos/keystonejs/keystone/issues/1316","labels_url":"https://api.github.com/repos/keystonejs/keystone/issues/1316/labels{/name}","comments_url":"https://api.github.com/repos/keystonejs/keystone/issues/1316/comments","events_url":"https://api.github.com/repos/keystonejs/keystone/issues/1316/events","html_url":"https://github.com/keystonejs/keystone/issues/1316","id":69130806,"number":1316,"title":"Installing on Openshift, ","user":{"login":"mharrisweb","id":8245572,"avatar_url":"https://avatars.githubusercontent.com/u/8245572?v=3","gravatar_id":"","url":"https://api.github.com/users/mharrisweb","html_url":"https://github.com/mharrisweb","followers_url":"https://api.github.com/users/mharrisweb/followers","following_url":"https://api.github.com/users/mharrisweb/following{/other_user}","gists_url":"https://api.github.com/users/mharrisweb/gists{/gist_id}","starred_url":"https://api.github.com/users/mharrisweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mharrisweb/subscriptions","organizations_url":"https://api.github.com/users/mharrisweb/orgs","repos_url":"https://api.github.com/users/mharrisweb/repos","events_url":"https://api.github.com/users/mharrisweb/events{/privacy}","received_events_url":"https://api.github.com/users/mharrisweb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-04-17T12:35:07Z","updated_at":"2015-04-17T14:52:20Z","closed_at":null,"body":"Hello, \r\n\r\nI am trying to get KS setup on Openshift. I can get the site to work locally but cannot get working in openshift, I get various missing module errors:\r\n\r\n```sh\r\nError: Cannot find module 'keystone'\r\n    at Function.Module._resolveFilename (module.js:338:15)\r\n    at Function.Module._load (module.js:280:25)\r\n    at Module.require (module.js:364:17) \r\n```\r\n\r\nmy package.json file:\r\n\r\n```json\r\n{\r\n  \"name\": \"node\",\r\n  \"version\": \"0.0.0\",\r\n  \"private\": true,\r\n  \"dependencies\": {\r\n    \"keystone\": \"latest\",\r\n    \"underscore\": \"latest\"\r\n  },\r\n  \"devDependencies\": {\r\n    \"grunt\": \"~0.4.4\",\r\n    \"grunt-express-server\": \"~0.4.17\",\r\n    \"grunt-contrib-jshint\": \"~0.7.1\",\r\n    \"grunt-contrib-compass\": \"^1.0.1\",\r\n    \"grunt-contrib-csslint\": \"^0.3.1\",\r\n    \"grunt-contrib-cssmin\": \"^0.11.0\",\r\n    \"grunt-contrib-watch\": \"^0.6.1\",\r\n    \"grunt-cssstats\": \"^1.0.1\",\r\n    \"grunt-stats\": \"^0.1.0\",\r\n    \"jshint-stylish\": \"~0.1.3\",\r\n    \"load-grunt-tasks\": \"~0.4.0\",\r\n    \"load-grunt-configs\": \"^0.4.1\",\r\n    \"grunt-node-inspector\": \"~0.1.5\",\r\n    \"time-grunt\": \"~0.3.1\",\r\n    \"grunt-concurrent\": \"~0.5.0\",\r\n    \"grunt-nodemon\": \"~0.2.1\",\r\n    \"open\": \"0.0.5\"\r\n  },\r\n  \"engines\": {\r\n    \"node\": \">=0.10.22\",\r\n    \"npm\": \">=1.3.14\"\r\n  },\r\n  \"scripts\": {\r\n    \"start\": \"node web.js\"\r\n  },\r\n  \"main\": \"web.js\"\r\n}\r\n```\r\n\r\nMy web.js:\r\n\r\n```js\r\nvar keystone = require('keystone');\r\n\r\n\r\nvar db_name = 'node';\r\n\r\n// //provide a sensible default for local development\r\n// mongodb_connection_string = 'mongodb://127.0.0.1:27017/' + db_name;\r\n// //take advantage of openshift env vars when available:\r\n// if(process.env.OPENSHIFT_MONGODB_DB_URL){\r\n//   mongodb_connection_string = process.env.OPENSHIFT_MONGODB_DB_URL + db_name;\r\n// }\r\n\r\n// default to a 'localhost' configuration:\r\nvar connection_string = 'mongodb://xxx:xxx@127.0.0.1:27017/node';\r\n// if OPENSHIFT env variables are present, use the available connection info:\r\nif(process.env.OPENSHIFT_MONGODB_DB_PASSWORD){\r\n  connection_string = process.env.OPENSHIFT_MONGODB_DB_USERNAME + \":\" +\r\n  process.env.OPENSHIFT_MONGODB_DB_PASSWORD + \"@\" +\r\n  process.env.OPENSHIFT_MONGODB_DB_HOST + ':' +\r\n  process.env.OPENSHIFT_MONGODB_DB_PORT + '/' +\r\n  process.env.OPENSHIFT_APP_NAME;\r\n}\r\n\r\n\r\nconsole.log(connection_string);\r\n\r\nkeystone.init({\r\n\t\r\n\t'name': 'node',\r\n\t\r\n\t'favicon': 'public/favicon.ico',\r\n\t'less': 'public',\r\n\t'static': ['public'],\r\n\t\r\n\t'views': 'templates/views',\r\n\t'view engine': 'jade',\r\n\t\r\n\t'auto update': true,\r\n\t'mongo': connection_string,\r\n\t\r\n\t'session': true,\r\n\t'auth': true,\r\n\t'user model': 'User',\r\n\t'cookie secret': 'xxx'\r\n});\r\n \r\n// Load your project's Models\r\n\r\nkeystone.import('models');\r\n \r\nkeystone.set('routes', require('./routes'));\r\n \r\nkeystone.start();\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/keystonejs/keystone/issues/comments/94001559","html_url":"https://github.com/keystonejs/keystone/issues/1316#issuecomment-94001559","issue_url":"https://api.github.com/repos/keystonejs/keystone/issues/1316","id":94001559,"user":{"login":"mharrisweb","id":8245572,"avatar_url":"https://avatars.githubusercontent.com/u/8245572?v=3","gravatar_id":"","url":"https://api.github.com/users/mharrisweb","html_url":"https://github.com/mharrisweb","followers_url":"https://api.github.com/users/mharrisweb/followers","following_url":"https://api.github.com/users/mharrisweb/following{/other_user}","gists_url":"https://api.github.com/users/mharrisweb/gists{/gist_id}","starred_url":"https://api.github.com/users/mharrisweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mharrisweb/subscriptions","organizations_url":"https://api.github.com/users/mharrisweb/orgs","repos_url":"https://api.github.com/users/mharrisweb/repos","events_url":"https://api.github.com/users/mharrisweb/events{/privacy}","received_events_url":"https://api.github.com/users/mharrisweb/received_events","type":"User","site_admin":false},"created_at":"2015-04-17T14:52:20Z","updated_at":"2015-04-17T14:52:20Z","body":"Thanks I'll dig deeper and report back."}}