skanti/Scan2CAD-Annotation-Webapp

It is not clear how to start ther server?

Closed this issue · 2 comments

Hi!
I am new to mongodb and node.js and want to try this annotation tool. It is not clear as to how to start the server. Is it after starting mongodb server?

After running the server I get the following

> MTurk3DAligner@1.0.0 start /home/shubham/Scan2CAD-Annotation-Webapp/server
> node --harmony ./index.js

Example app listening at address http://:: in port: 8080

Not sure if this is correct?

Okay! Got it working. To make it work you have to add an explicit hostname. In ./server/index.js file go to line 202 and replace it with following lines.

mongodb_helper.connect_to_db(config.db_annotation).then( res => {
    db_annotation = res;
    const server = app.listen(config.http_port, "127.0.0.1", () => {
        do_checks_and_assertions();
        load_routings();
        const host = server.address().address;
        const port = server.address().port;
        console.log("Example app listening at address http://%s in port: %s", host, port)
    });
});

The change is explicit mention of localhost name i.e. 127.0.0.1