kopia lustrzana https://github.com/c9/core
Merge pull request +7758 from c9/sdk-port
Suggest port 8080, http auth for running sdkpull/117/merge
commit
2addd4339f
|
@ -91,10 +91,19 @@ module.exports = function(config, optimist) {
|
|||
|
||||
var isLocalhost = host == "localhost" || host == "127.0.0.1";
|
||||
if (!/:/.test(argv.auth) && !isLocalhost) {
|
||||
console.log("Authentication is required when not running on localhost.\nPlease use -a user:pass or --listen localhost to listen locally.");
|
||||
console.log("switching to localhost");
|
||||
console.log("Authentication is required when not running on localhost.");
|
||||
console.log("If you would like to expose this service to other hosts or the Internet");
|
||||
console.log("at large, please specify -a user:pass to set a username and password");
|
||||
console.log("(or use -a : to force no login).");
|
||||
console.log("Use --listen localhost to only listen on the localhost interface and");
|
||||
console.log("and suppress this message.\n");
|
||||
host = config.host = "127.0.0.1";
|
||||
}
|
||||
if (/:/.test(argv.auth) && !isLocalhost && !process.env.C9_HOSTNAME) {
|
||||
console.log("Warning: running Cloud9 without using HTTP authentication.");
|
||||
console.log("Run using --listen localhost instead to only expose Cloud9 to localhost,");
|
||||
console.log("or use -a username:password to setup HTTP authentication\n");
|
||||
}
|
||||
var auth = (argv.auth || ":").split(":");
|
||||
|
||||
var plugins = [
|
||||
|
|
|
@ -164,4 +164,5 @@ updateNodeModules
|
|||
echo -e "c9.*\n.gitignore" > plugins/.gitignore
|
||||
|
||||
echo "Success!"
|
||||
echo "run '${yellow}node server.js -p 8181 -l 0.0.0.0 -a :${resetColor}' to launch Cloud9"
|
||||
|
||||
echo "run '${yellow}node server.js -p 8080 -a :${resetColor}' to launch Cloud9"
|
||||
|
|
|
@ -7,6 +7,7 @@ module.exports = function(manifest, installPath) {
|
|||
}
|
||||
|
||||
var path = require("path");
|
||||
var os = require("os");
|
||||
var runners = require("../plugins/c9.ide.run/runners_list").local;
|
||||
var builders = require("../plugins/c9.ide.run.build/builders_list");
|
||||
|
||||
|
@ -28,6 +29,7 @@ module.exports = function(manifest, installPath) {
|
|||
var correctedInstallPath = installPath.substr(0, home.length) == home
|
||||
? "~" + installPath.substr(home.length)
|
||||
: installPath;
|
||||
var inContainer = os.hostname().match(/-\d+$/);
|
||||
|
||||
var config = {
|
||||
standalone: true,
|
||||
|
@ -45,7 +47,7 @@ module.exports = function(manifest, installPath) {
|
|||
sdk: sdk,
|
||||
pid: process.pid,
|
||||
port: process.env.PORT || 8181,
|
||||
host: process.env.IP || "0.0.0.0",
|
||||
host: process.env.IP || (inContainer ? "0.0.0.0" : "127.0.0.1"),
|
||||
testing: false,
|
||||
platform: process.platform,
|
||||
arch: process.arch,
|
||||
|
|
Ładowanie…
Reference in New Issue