https://elastic-glass-rsfnuhzosl.now.sh
This project takes advantage of many new web technologies such as:
- nextjs - server side rendered offline react
- Elasticsearch - database for serach engine
- reactivesearch - ui framework for elastic search and react
Be sure to make changes to the config.js file to connect this project to your own elastics bucket.
Do not edit the json files in /components as they will be updated when you start node app The config.js has three main parts
-
serverSettings The server setting is where you set information like port number
-
appSettings app settings is where you set the title, font, colours and give the elastic database information. The following is better documented here
- elasticApp - name of database
- credentials - username:password if required
- elasticURI - the url of the server if needed
- type - the type of database you are using
-
databaseMap Database map is where you can bind the content of the database to the GUI the only required field is fullname which has to be unique. For example if there is a variable called picture and you want to show it then set
avatar: 'picture',
the project autofills your serach as your filters
To set up please make sure you have node higher than version 8 installed and build tools To install the project
npm install
To start development run the following and the project should restart the react app when a change is made to it You will need to reboot manually if config or server side changes are made
npm run dev
you need to build a production copy of the project. This is done to increase performance
npm run build
after you have build the project you can start with the following
npm run start
or use the following command to start with pm2 which will load balance the project
npm run pm2
If you are having issues running on window you might need to run the following command in administrator powershell then reboot. This will fix most node issues on windows but if issues remain try changing node version and installing again.
npm install --global --production windows-build-tools