diff --git a/Dockerfile b/Dockerfile index 9bda529ddf..db9983cace 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ FROM node:12-alpine WORKDIR /app ADD . /app/ -EXPOSE 3000 +EXPOSE 4000 # We run yarn install with an increased network timeout (5min) to avoid "ESOCKETTIMEDOUT" errors from hub.docker.com # See, for example https://github.com/yarnpkg/yarn/issues/5540 diff --git a/angular.json b/angular.json index b63d82fd4b..b3fbd82f02 100644 --- a/angular.json +++ b/angular.json @@ -66,7 +66,7 @@ "builder": "@angular-builders/custom-webpack:dev-server", "options": { "browserTarget": "dspace-angular-cli:build", - "port": 3000 + "port": 4000 }, "configurations": { "production": { diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index a2aeb977d1..05376cfb36 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -7,7 +7,7 @@ services: environment: DSPACE_HOST: dspace-angular DSPACE_NAMESPACE: / - DSPACE_PORT: '3000' + DSPACE_PORT: '4000' DSPACE_SSL: "false" image: dspace/dspace-angular:latest build: @@ -16,8 +16,8 @@ services: networks: dspacenet: ports: - - published: 3000 - target: 3000 + - published: 4000 + target: 4000 - published: 9876 target: 9876 stdin_open: true diff --git a/docs/Configuration.md b/docs/Configuration.md index b2ec81533d..f523a9a1a1 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -8,7 +8,7 @@ Default configuration file is located in `config/` folder. All configuration opt Some few configuration options can be overridden by setting environment variables. These and the variable names are listed below. ## Nodejs server -When you start dspace-angular on node, it spins up an http server on which it listens for incoming connections. You can define the ip address and port the server should bind itsself to, and if ssl should be enabled not. By default it listens on `localhost:3000`. If you want it to listen on all your network connections, configure it to bind itself to `0.0.0.0`. +When you start dspace-angular on node, it spins up an http server on which it listens for incoming connections. You can define the ip address and port the server should bind itsself to, and if ssl should be enabled not. By default it listens on `localhost:4000`. If you want it to listen on all your network connections, configure it to bind itself to `0.0.0.0`. To change this configuration, change the options `ui.host`, `ui.port` and `ui.ssl` in the appropriate configuration file (see above): ``` @@ -17,7 +17,7 @@ module.exports = { ui: { ssl: false, host: 'localhost', - port: 3000, + port: 4000, nameSpace: '/' } }; @@ -27,7 +27,7 @@ Alternately you can set the following environment variables. If any of these are ``` DSPACE_SSL=true DSPACE_HOST=localhost - DSPACE_PORT=3000 + DSPACE_PORT=4000 DSPACE_NAMESPACE=/ ``` @@ -51,7 +51,7 @@ Alternately you can set the following environment variables. If any of these are ``` DSPACE_REST_SSL=true DSPACE_REST_HOST=localhost - DSPACE_REST_PORT=3000 + DSPACE_REST_PORT=4000 DSPACE_REST_NAMESPACE=/ ``` @@ -62,4 +62,4 @@ Angulartics can be configured to work with a number of other services besides Go In order to start using one of these services, select it from the [Angulartics Providers page](https://angulartics.github.io/angulartics2/#providers), and follow the instructions on how to configure it. -The Google Analytics script was added in [`main.browser.ts`](https://github.com/DSpace/dspace-angular/blob/ff04760f4af91ac3e7add5e7424a46cb2439e874/src/main.browser.ts#L33) instead of the `` tag in `index.html` to ensure events get sent when the page is shown in a client's browser, and not when it's rendered on the universal server. Likely you'll want to do the same when adding a new service. \ No newline at end of file +The Google Analytics script was added in [`main.browser.ts`](https://github.com/DSpace/dspace-angular/blob/ff04760f4af91ac3e7add5e7424a46cb2439e874/src/main.browser.ts#L33) instead of the `` tag in `index.html` to ensure events get sent when the page is shown in a client's browser, and not when it's rendered on the universal server. Likely you'll want to do the same when adding a new service. diff --git a/e2e/protractor.conf.js b/e2e/protractor.conf.js index 32a30239de..8e71426ab8 100644 --- a/e2e/protractor.conf.js +++ b/e2e/protractor.conf.js @@ -12,7 +12,7 @@ exports.config = { // Change to 'false' to run tests using a remote Selenium server directConnect: true, // Change if the website to test is not on the localhost - baseUrl: 'http://localhost:3000/', + baseUrl: 'http://localhost:4000/', // ----------------------------------------------------------------- specs: [ './src/**/*.e2e-spec.ts' diff --git a/server.ts b/server.ts index 442bb19885..ffa528ea3e 100644 --- a/server.ts +++ b/server.ts @@ -27,7 +27,7 @@ import * as cookieParser from 'cookie-parser'; // Express server const app = express(); -const PORT = process.env.PORT || 3000; +const PORT = process.env.PORT || 4000; const DIST_FOLDER = join(process.cwd(), 'dist/browser'); // * NOTE :: leave this as require() since this file is built Dynamically from webpack diff --git a/src/environments/environment.common.ts b/src/environments/environment.common.ts index 62b988e0fc..9dcac65363 100644 --- a/src/environments/environment.common.ts +++ b/src/environments/environment.common.ts @@ -9,7 +9,7 @@ export const environment: GlobalConfig = { ui: { ssl: false, host: 'localhost', - port: 3000, + port: 4000, // NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript nameSpace: '/', },