diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 7dd512147..af4d08ff6 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -25,17 +25,23 @@ Install Python Install the ASReview package - pip install -e .[dev] +``` +pip install -e .[dev] +``` Start the Python API server with the Flask development environment - export FLASK_DEBUG=1 - asreview lab +``` +export FLASK_DEBUG=1 +asreview lab +``` For Windows, use - set FLASK_DEBUG=1 - asreview lab +``` +set FLASK_DEBUG=1 +asreview lab +``` #### Formatting and linting @@ -77,30 +83,36 @@ follows: 2. Before the front end development can be started, the back end has to run as well. Therefore, first, start the Python API server with the Flask development environment: - export FLASK_DEBUG=1 - asreview lab +``` +export FLASK_DEBUG=1 +asreview lab +``` For Windows, use - set FLASK_DEBUG=1 - asreview lab +``` +set FLASK_DEBUG=1 +asreview lab +``` **Important**: Ignore `localhost:5000`, because this is not relevant for the development version, which will run on `localhost:3000`. 3. Next, open a new CLI and navigate to `asreview/webapp` and install the front end application with [npm](https://www.npmjs.com/get-npm): - cd asreview/webapp - npm install +``` +cd asreview/webapp +npm install +``` Start the local front end application with npm - npm start +``` +npm start +``` 4. Open the web browser at `localhost:3000` - - ### Front end development and connection/CORS issues In development, when working on the front end, the front- and backend are strictly separated. It is assumed the Flask backend runs on port 5000 and the React front end on port 3000. Deviating from these ports will lead to connection or CORS (Cross-Origin Resource Sharing) issues.