Skip to content

Commit

Permalink
Merge pull request roperi#2 from lpmi-13/add_concurrent_start
Browse files Browse the repository at this point in the history
add a concurrent start command for easier local dev
  • Loading branch information
roperi authored Apr 26, 2024
2 parents b497aea + 1bad000 commit a7fa110
Show file tree
Hide file tree
Showing 3 changed files with 155 additions and 29 deletions.
18 changes: 4 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Install the following prerequisites:

#### 1. Create a virtual environment

From the **root** directory, run:
From the **root** directory of the project, run:

```bash
cd backend
Expand Down Expand Up @@ -181,22 +181,12 @@ npm install

### Run the application

To run the application, you need to have both the backend and the frontend up and running.

#### 1. Run backend
To run the application, you need to have both the backend and the frontend up and running. This is accomplished by using the `concurrently` npm package.

From the **backend** directory, run:

```bash
python manage.py runserver
```

#### 2. Run frontend

From the **frontend** directory, run:
From the **root** directory, run:

```bash
npm start
npm start --prefix frontend
```

#### 3. View the application
Expand Down
161 changes: 148 additions & 13 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"web-vitals": "^3.4.0"
},
"scripts": {
"start": "react-scripts start",
"start": "concurrently \"python ../backend/manage.py runserver\" \"react-scripts start\"",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
Expand All @@ -58,6 +58,7 @@
]
},
"devDependencies": {
"@types/leaflet": "^1.9.3"
"@types/leaflet": "^1.9.3",
"concurrently": "^8.2.2"
}
}

0 comments on commit a7fa110

Please sign in to comment.