Search code examples
node.jsmongodbexpressportappfog

How do I, in nodejs, set up a Mongo viewer (like Mongo-Express) on the same port as my main app?


I'm new to just about everything with regards to nodejs and Mongodb but I managed to get a simple app up and running and now I want a database viewer. I found Mongo-Express and installed it on my localhost where it works fine. The viewer is configured in a config file with host a baseUrl and port.

The problem is on the live server (AppFog) where I only have one port available which is occupied by my main app. How do I solve this issue? Can they run on the same port or is there another viewer available that doesn't need to run on a separate port?


Solution

  • I can recommend MongoMate which can either run as a standalone MongoDB Browser or (what you want) it can be mounted within an Express app. See the webpage for more info.

    PS. I built MongoMate :P