-
Notifications
You must be signed in to change notification settings - Fork 5
Deploying OpenSchema Backend
The repository can be cloned to work locally using git with the following command:
git clone https://github.com/magma/openschema.git
The code can be found inside /openschema-backend.
OpenSchema ETL runs using NodeJS.
You can use an IDE like Visual Studio Code.
-
Create a copy of the file named .env.template and rename it to .env.
-
Fill the MONGODB_URI field. This should point towards the MongoDB instance you wish to use as your OpenSchema datalake.
- MongoDB can be installed following the instructions on their website.
Example:
MONGODB_URI=mongodb://localhost:27017/openschema_datalake
-
Fill the AUTH_USERNAME and AUTH_PASSWORD fields. These are credentials that will be used for HTTP Basic Auth.
- You can generate your own values by running the following command:
openssl rand -base64 96
Example:
AUTH_USERNAME = "ir8foanSHfN4NcgzB9NwrGHz+6tsEPPVMRnS4H06kuaqK0/OvylGGA+7BKMBfb3ypUlOle5KRwo5p3AL5DdhJOAe1VXtLGF2OB6IzRkrzJ9ZJ1iNrM0JY569UTUXvZmW" AUTH_PASSWORD = "R2e/Kql9eudixRPiYvpUckE8qr77tj0l4TOhoKxIqF21MfAxnnqBbYilfideM3fQ9yZsro3vgvSy8AQYJJF/t9nqqG2PIPDKr3+MBeCB+OpuQdUcPPp869HiabfskRYy"
- You can generate your own values by running the following command:
-
You can generate your own self-signed certificate by running the following command:
openssl req -nodes -x509 -newkey rsa:2048 -keyout server.key -out server.crt -days 365
-
Create a /keys folder and add server.crt and server.key to it.
Make sure you use the same server.crt (backend.crt) file when building openschema-android.
-
Install all the dependencies:
npm install
-
Run the application:
node app.js