Search code examples
mongodbcloud9-ide

How can I use 'mongo-express' on Cloud9?


I'm installed mongo-express, and it looks ok:

enter image description here

but I can't reach port 8081 from oustide world...

Maby I can get advise of onother db-visualisation service I can use on Cloud9?


Solution

  • Since Cloud9 workspaces only expose port 8080, you can modify the mongo-express config (https://github.com/andzdroid/mongo-express/blob/master/config.default.js) to set the port to 8080 within the following section:

    site: {
      //baseUrl: the URL that mongo express will be located at
      //Remember to add the forward slash at the end!
      baseUrl: '/',
      port: 8081, // <<--- 8080
      cookieSecret: 'cookiesecret',
      sessionSecret: 'sessionsecret',
      cookieKeyName: 'mongo-express'
    },
    

    You should find the config.default.js within your workspace. Just copy/rename it to config.js and change the port from 8081 to 8080 and you should be all set.

    Hope this helps.