mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-13 04:53:06 +00:00
Set a few configuration options an env variables.
For docker containers it would be useful if any configuration variables defining how to connect to the angular ui and how it connects to the DSpace 7 REST endpoint could be overriden by environment variables. We should not extend configuration by environment variables too much.
This commit is contained in:
@@ -21,8 +21,6 @@ import { ENV_CONFIG } from './config';
|
||||
export function startServer(bootstrap: Type<{}> | NgModuleFactory<{}>) {
|
||||
const app = express();
|
||||
|
||||
const port = ENV_CONFIG.ui.port ? ENV_CONFIG.ui.port : 80;
|
||||
|
||||
if (ENV_CONFIG.production) {
|
||||
enableProdMode();
|
||||
app.use(compression());
|
||||
@@ -90,7 +88,7 @@ export function startServer(bootstrap: Type<{}> | NgModuleFactory<{}>) {
|
||||
https.createServer({
|
||||
key: keys.serviceKey,
|
||||
cert: keys.certificate
|
||||
}, app).listen(port, ENV_CONFIG.ui.host, () => {
|
||||
}, app).listen(ENV_CONFIG.ui.port, ENV_CONFIG.ui.host, () => {
|
||||
serverStarted();
|
||||
});
|
||||
}
|
||||
@@ -127,7 +125,7 @@ export function startServer(bootstrap: Type<{}> | NgModuleFactory<{}>) {
|
||||
});
|
||||
}
|
||||
} else {
|
||||
app.listen(port, ENV_CONFIG.ui.host, () => {
|
||||
app.listen(ENV_CONFIG.ui.port, ENV_CONFIG.ui.host, () => {
|
||||
serverStarted();
|
||||
});
|
||||
}}
|
||||
|
Reference in New Issue
Block a user