This application has been created with create-dm-app
By following these steps, you will have the application up and running locally on your machine.
Requirements:
- Node 14.0.0 or later (We recommend using the latest LTS version).
- Docker compose
- Python 3.8 or later
- dm-cli python package
To run the Analysis Platform application locally, you will need an instance of DMSS running locally.
Go to the dm-app-analysis-platform
folder in a terminal and run the commands:
docker-compose pull
docker-compose up --build
This will start all required services.
To reset the database, open a new terminal window and navigate to the dm-app-analysis-platform
folder and run the commands:
docker-compose run --rm dmss reset-app
Note: it is recommended to use a python virtual environment before you install the dm-cli package
pip install dm-cli
Run the following command to upload the documents in the folder my-app/app to DMSS
dm reset app/
You must also upload documents from dm-job
docker-compose run --rm job-api dm -u http://dmss:5000 reset ../app
In your terminal window, go to the dm-app-analysis-platform
folder in the terminal and run
dm create-lookup analysis-platform AnalysisPlatformDS/instances/recipe_links
When inside the dm-app-analysis-platform
folder in the terminal, run
yarn install
yarn start
or alternatively
npm install
npm start
The web app can now be reached at http://localhost:3000 in the web browser. (Remember, you must have the docker-compose services running to use the web application)
Oneliner to get database up and running:
docker-compose run --rm dmss reset-app && dm reset app && docker-compose run --rm job-api dm -u http://dmss:5000 reset ../app && dm create-lookup analysis-platform AnalysisPlatformDS/instances/recipe_links
In this repo, pre-commit has been used to ensure consistent code formatting. The pre-commit hook will run prettier formatting and analyze the JavaScript code using eslint .
To run pre-commit, it needs to be installed on your local machine with
pip install pre-commit
Once installed, pre-commit can be run with:
pre-commit run --all-files