Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

1. Install Software

First ensure all the Prerequisites are meet. Then you can download the Enterprise Search from Download & Execute

2. Configure the Server

Change the DOMAIN_NAME and SERVER_PORT variables as required, then change the Elasticsearch properties to meet your instance.

Info

By default the server will always prefer the port set as the environment variable over the one in the config, if the environment variable is not set, the fallback is the one in the config.



Code Block
languagejs
themeRDark
titleconfig/server/env/all.js
const DOMAIN_NAME = 'localhost'
const SERVER_PORT = process.env.PORT || 3000

module.exports = {
    domain: DOMAIN_NAME,
    app: {
        title: 'Enterprise Search',
        description: 'Enterprise Search',
        keywords: 'Enterprise Search, Independent'
    },
    port: SERVER_PORT,
    .
    .
    .
    elastic: {
        schema: 'http',
        host: 'localhost',
        port: 9200,
        indexName: 'esui'
    }
}
Tip

The server configuration is multi environment. So in the folder config/server/env you will find the following files: all.js, local.jsdevelopment.js and production.js. Each file will contain the configuration for that specific environment. 

3. Run the NodeJS Server

To start the server just execute in the console 

Code Block
languagetext
themeFadeToGrey
npm run start

The server by default will start in development mode, using the development environment configuration. To start the server in other modes (local, development or production) you must set the NODE_ENV environment variable, depending on the console, like this:

  • Powershell: $env:NODE_ENV="local"
  • CMD: set NODE_ENV="local"
  • Shell: export NODE_ENV="local"

The same applies for the port:

  • Powershell: $env:PORT=8080
  • CMD: set PORT=8080
  • Shell: export PORT=8080
Info

The server will have the API for the endpoint as well as the user interface