0

I have created a MEAN stack application on https://openshift.redhat.com/ and it was successfully running on the web.

Default source code of the project synced form: https://github.com/linnovate/mean-on-openshift.git

For further development I am cloning the hosted git source using using git url mentioned in the applications page. (e.g git clone ssh://[email protected]/~/git/nodejs.git/).

After clone the source code to local system, opening the project in sublime text editor. I can see in the config/env/development.js there are lot of configuration are used like process.env.OPENSHIFT_XXX. I was changed the some config value mentioned below and trying to start server using command : 'node server', but server was not starting throwing error.

{
db:  db: 'mongodb://' + (process.env.DB_PORT_27017_TCP_ADDR || 'localhost:27017') + ':' + '/mean-dev',
hostname: process.env.OPENSHIFT_NODEJS_IP || 'http://localhost:3000'
}

Can someone help me how to run Openshift mean project in local system and what all configuration needed before running it in local system.

System Config :

Ubuntu 12.04
MongoDB v2.6.6
Nodejs v0.10.40
npm 1.4.28
grunt-cli v0.1.13

Error :

$ node server

    Mean app started on port 3000 (development)

    events.js:72
        throw er; // Unhandled 'error' event
              ^
     Error: getaddrinfo ENOTFOUND
    at errnoException (dns.js:37:11)
    at Object.onanswer [as oncomplete] (dns.js:124:16)
3
  • Is the code that you post the error that you're getting? Also; what local system are you running on?
    – kramer65
    Sep 4, 2015 at 6:02
  • Thanks, for response, System info and error updated in the post. Please help, thanks. Sep 4, 2015 at 6:13
  • db: db: 'mongodb://', isn't that a typo ?
    – spenibus
    Sep 18, 2015 at 13:29

1 Answer 1

2

Git:

$ NODE_ENV=test node server
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.