Getting started
Enroll for the developer program
To start development you need to enroll for the developer program first. This will enable your account to use Developer Mode. If you have not yet registered your account, you can do so with the following button:
When account registration has been completed, you will receive a confirmation email. From that moment on you will have access to the SDK development environment (sandbox)
Developer Mode
Once you are enrolled in the developer program and you have access to the SDK development environment (sandbox), you can start with SDK add-on development.
Go to SandboxGo to the SDK development environment (sandbox), and start by navigating to the Developer tab in My Account to access the developer settings. Under these settings, turn on Developer Mode.
With Developer Mode on, your eLab environment has now been prepared to get started. But to start development, a local development enviroment also has to be set up.
Set-up SDK Development Environment
You need to set-up your development environment to be able to host add-ons from you computer on a https web server to make them available in the SDK Development environment. To set-up in Windows, proceed as follows:
Node.js requirements
Node.js version >= 16 or above (which can be checked by running: node -v).
You can use nvm for managing multiple Node versions on a single machine installed. When installing Node.js, you are recommended to check all checkboxes related to dependencies.
Installation of NodeJS
To host add-ons from you computer on a https web server, we make use of the NodeJS web server. To get started with NodeJS:
- Download the latest stable version of node.js from https://nodejs.org/en/download/
- Double click the downloaded node-vx.xx-x64.msi or node-vx.xx-x86.msi file to install NodeJS.
- After NodeJS has been installed, confirm the installation of NodeJS as follows:
- Open the start menu and press win + r
- Enter cmd and hit enter or click ok
- In the command prompt enter node –v and hit enter
If the installation of NodeJS is successful, the installed NodeJS version will be returned in the console.
$ node -v
V16.18.1
Setting up the https web server on your local computer
- Install the https-server package by entering
npm install http-server –g
in the command prompt window and hitting enter. - Once the installation is completed you can start the server by entering the following command in the command prompt:
http-server
. - After hitting enter the server will start and the command prompt will return several urls. These are the urls that are being hosted by the NodeJS web server.
$ http-server
Starting up http-server, serving ./
Available on:
http://your.external.ip.adress:8080
http://192.168.1.33:8080
http://127.0.0.1:8080
Hit CTRL-C to stop the server
- Confirm that http server is running by copy and pasting one of the three addresses in your browser. Make sure to include the :8080 . The web browser will open the default root folder of the http server root folder (a folder on your local computer)
If you decide to stop the NodeJS you can either close command prompt or you can press CTRL+C while the focus is in command prompt. Note that once the server or the command prompt is closed the web-browser will no longer be able to contact the web addresses.
SSL passing of the http server
Since all communication in eLabJournal runs via a secured connection (https), the http sever should be using https. To make your web server use SSL proceed as follows:
- Download open SSL (download the correct version here)
- Navigate to the bin folder in the downloaded file and double click openssl.exe
- A command prompt window will open.
- Copy and paste the following command:
$ req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 10000 –nodes
- Two files key.pem and cert.pem are generated which are needed in the next step
Completing the SDK add-on hosting
- Create a folder on your local computer from where you would like to work (for example create folder eLAB-SDK on C:).
- Create a file called SDK-server.bat and include the following code to the file:
http-server -S -C "cert.pem" -o -p 8443
and save the file. - Move the generated files key.pem and cert.pem in the previous step to this folder
- Finally, move the downloaded SDK template script into the folder
- Once these 4 files are in the created folder, you can double click the created SDK-server.bat file. The command prompt will open confirming that the http server is running. Note that the server is serving over https and that the web addresses now start with https.
$ http-server -S -C "cert.pem" -o -p 8443 Starting up http-server, serving ./ Available on: https://your.external.ip.adress:8443 https://192.168.1.33:8443 https://127.0.0.1:8443 Hit CTRL-C to stop the server
Secondly, your default browser will open a window displaying the content of the folder you created including the SDK template script file.
Now you are all set to develop your own add-ons and extend the functionality of eLAB. Find the available classes and modules in the SDK documentation. The eLabJournal API is available here. The next step will show you how to load an add-on into eLab using an example add-on.
Updated 8 months ago