Application work fine on localhost .but when its connect to server it getting error.
I connect server through port 22
This is the error
Error:
You are using a used port. You must change a port or you must kill a process which is listening on a port. Open terminal and write (example): lsof -i :22
or lsof -i :80
or lsof -i :8000
and kill PID
of the process.
How to change the listening PORT in total.js?
default-ip : 127.0.0.1
default-port : 8000
or
// For e.g. Heroku
default-ip : auto
default-port : auto
var fs = require("fs");
var options = {};
// options.ip = "127.0.0.1";
// options.port = parseInt(process.argv[2]);
options.port = 8000;
// for development:
require('total.js').http('debug', { port: 8000 });
// or for production:
require('total.js').http('release', { port: 8000 });
Thanks and documentation: http://docs.totaljs.com