diff --git a/README.md b/README.md index 2a7505192..c4931849c 100644 --- a/README.md +++ b/README.md @@ -50,11 +50,12 @@ Setup Successful! ``` ### Authentication -By default running `npm start` when developing the API will be set to `http://portal.gdc.nci.nih.gov:5000` as that -is the new default for it to ensure authentication calls receive their proper cookies. If you need to change this you -can do so by creating a custom `.env` file in the root of the repository with overriding keys like those in `env.dist`. +In order to properly run the UI and login to test the auth you will need to run the application +in a specific way. This includes `sudo` and running the app on port `80`. You will need to ensure +that you don't have something else using that port (like a local apache setup). -It is important that this keeps in sync with the host the API is set to. Changing one requires keeping both up to date. +The following command should work: +`sudo GDC_API=http://portal.gdc.nci.nih.gov:5000 GDC_PORT=80 npm start` #### Modifying /etc/hosts In order to support local use of the login system we need to add the following diff --git a/app/scripts/app.ts b/app/scripts/app.ts index a7c689566..ea20b9a19 100755 --- a/app/scripts/app.ts +++ b/app/scripts/app.ts @@ -108,7 +108,9 @@ function appRun(gettextCatalog: any, notify.closeAll(); notify({ message: "", - messageTemplate: "Unable to connect to the GDC API. Make sure you have accepted the Security Certificate.
If not, please click here and accept the Security Certificate
", + messageTemplate: "Unable to connect to the GDC API. Make sure you have " + + "accepted the Security Certificate.
If not, please click " + + "here and accept the Security Certificate
", container: "#notification", classes: "alert-danger" }); diff --git a/gulpfile.js b/gulpfile.js index ebf3f215a..cd13243cb 100755 --- a/gulpfile.js +++ b/gulpfile.js @@ -13,8 +13,9 @@ var mkdirp = require("mkdirp"); var env = { api: process.env.GDC_API || "http://localhost:5000", - auth: process.env.GDC_AUTH || "http://localhost:8000", - base: process.env.GDC_BASE || "/" + auth: process.env.GDC_AUTH || "https://gdc.nci.nih.gov", + base: process.env.GDC_BASE || "/", + port: process.env.GDC_PORT || 3000 }; var AUTOPREFIXER_BROWSERS = [ @@ -393,6 +394,7 @@ gulp.task('serve:web', function (cb) { ], baseDir: 'dist' }, + port: env.port, host: "portal.gdc.nci.nih.gov" // open: "external" };