Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,38 @@ Start flask with
docker exec -it $(docker ps -q --filter name=db) psql -U postgres bimsurfer2
~~~

## Running front- and backend locally

Update and install submodules

~~~
submodule init && submodule update
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git submodule update --init --recursive

~~~

Set environment to 'development'

~~~
export environment=development
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

export is for linux/wsl, on windows use set

~~~

Setup local environment with the following packages
~~~
pip install lark-parser==0.12.0 numpy ifcopenshell flask flask-cors numpy gunicorn rq redis SQLAlchemy psycopg2 psycopg2cffi sqlalchemy-utils Flask-BasicAuth flasgger requests XlsxWriter requests_oauthlib Authlib requests argparse orjson --upgrade && conda install flake8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

psycopg2 psycopg2cffi are not needed, why not use pip to install flake8 as well?

~~~

Depending on the OS, change ui/package.json. For instance to 'bash run_debug.sh' in case of a linux system.
~~~
"api": "cd ../application && run_no_debug.bat"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding api-windows and api-linux or sth instead of just api to package.json so that no local change need to be made.

~~~

Install npm, and concurrently run both the Flask backend and the React frontend.

~~~
cd ui
npm install
npm-run-all -p start api
~~~

### Observability notes

#### Uploads per day
Expand Down