-
Notifications
You must be signed in to change notification settings - Fork 11
Local installation for development
Most of the steps are the same as in the README.md file.
This will setup a locally accessible IVIS instance (primarily for development and testing). This setup should work on Linux machines as well as in WSL.
All endpoints (trusted, sandbox, public) will provide only HTTP as follows:
- http://localhost:8080 - trusted endpoint
- http://localhost:8081 - sandbox endpoint
- http://localhost:8082 - api endpoint
-
Login as root. (We had some problems running npm as root on CentOS 7 on AWS. This seems to be fixed by the seemingly extraneous
su
withinsudo
.)sudo su -
-
Install GIT
For CentOS 8 type:
dnf install -y git
For CentOS 7 type:
yum install -y git
For Ubuntu 18.04 LTS type
apt-get install -y git
-
Download IVIS using git to the
/opt/ivis-core
directorycd /opt git clone https://github.com/smartarch/ivis-core.git cd ivis-core
-
Run the installation script.
For CentOS 8 type:
bash setup/install-centos8-local.sh
For CentOS 7 type:
bash setup/install-centos7-local.sh
For Ubuntu 18.04 LTS type:
bash setup/install-ubuntu1804-local.sh
-
Create file
server/config/development.yaml
and copywww
andmysql
configuration fromserver/config/production.yaml
toserver/config/development.yaml
. -
Start the server for development (or run
start.sh
).cd server NODE_ENV=development node index.js
-
Compile the client.
cd client npm run build
Or use incremental compilation (recompiles when files update).
cd client npm run watch
-
Open the trusted endpoint (like
http://localhost:8080
) -
Authenticate as
admin
:test
We recommend using WebStorm for development and debugging. This section will help you set up the debugging configuration for WebStorm.
The client needs to be (incrementally) compiled using the npm run watch
command. The easiest way to set it up as a run configuration in WebStorm is to open the client/package.json
file and click on the Run
button (green arrow) next to the "watch"
script (line 13).
Create a new run configuration of the JavaScript Debug
type and set the following properties:
-
URL
:http://localhost:8080/
-
Remote URLs of local files
:- add one entry with
-
File/Directory
:client/src
(the full absolute path might be necessary) -
Remote URL
:http://localhost:8080/
-
- add one entry with
If this doesn't work (the execution doesn't pause at breakpoints), try changing the Remote URLs of local files
to:
- one entry with
-
File/Directory
:client/src
(the full absolute path might be necessary) -
Remote URL
:webpack:///./src
-
- when working with a wrapper project around
ivis-core
, also add-
File/Directory
:ivis-core/client/src
(the full absolute path might be necessary) -
Remote URL
:webpack:///../ivis-core/client/src
-
Create a new run configuration of the Node.js
type and set the following properties:
-
Node interpreter
: select the correct Node interpreter. When working with WSL, you might want to use the Node interpreter from WSL:Add...
->Add WSL...
-
Working directory
:server
(the full absolute path might be necessary) -
JavaScript file
:index.js
-
Environment variables
:NODE_ENV=development