Find server url of nodejs application

nodejs

#1

I am trying to run wikijs on the c9 environment.

I am running node v7.10.1 and have installed wiki js via:

npm install wiki.js@latest

The installation works fine for me, but I cannot configure the environment as I do not find the node url.

I tried the following:

npm install c9config and running the following code:

var c9config = require("c9config"); 
c9config.isC9 // true or false depending wether on C9 or not. 
c9config.print() // prints an overview of the important information to console 
c9config.workspace

I got back:

┌─────────────────┬────────────────────────────────┐
│ c9 propertyName │ c9 value                       │
├─────────────────┼────────────────────────────────┤
│ isC9            │ true                           │
├─────────────────┼────────────────────────────────┤
│ name            │ wikijs                         │
├─────────────────┼────────────────────────────────┤
│ owner           │ user                           │
├─────────────────┼────────────────────────────────┤
│ ideUrl          │ https://ide.c9.io/<user>/wikijs │
├─────────────────┼────────────────────────────────┤
│ serveUrl        │ wikijs-<user>.c9users.io        │
└─────────────────┴────────────────────────────────┘

My app runs on port 3000, so I tried: ikijs-<user>.c9users.io:3000

However, this still gives me an empty page page.

Any suggestions how to find the correct url?

I appreciate your replies!


#2

you need to change your app to run on port 8080, since only ports 8080 8081 and 8082 are open