Skip to content
This repository was archived by the owner on Dec 19, 2021. It is now read-only.

Commit 9857ebd

Browse files
committed
Overmind: Config to start and end everything
Install tmux and overmind and copy the `.overmind.env.example` file to `overmind.env` and copy the `Procfile.dev.example` to `Procfile.dev` then adjust the location of your frontend repo in the Procfile. Default assumes that the frontend repo is located in the same folder as the backend repo. For ex: Change `cd ../dwellingly-app` to `cd ../your_relative_location` or use an absolute path. Start all servers with `overmind start`. You can connect to any server in the terminal with `overmind connect name_of_process`. for ex: `overmind connect frontend` or `overmind connect backend` This will start a development frontend and backend server. And start a testing backend and frontend server. Simplifies start up and removes the need to set config to specify which server to start.
1 parent dc04469 commit 9857ebd

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ __pycache__/
44
*.py[cod]
55
*$py.class
66

7+
# overmind config
8+
.overmind.env
9+
Procfile.dev
10+
711
# C extensions
812
*.so
913

.overmind.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
OVERMIND_PROCFILE=Procfile.dev

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ NOTE: Default development database is SQLite3. (Optionally setup and use [Postgr
9898

9999
8. Start the server using the flask environment (required every time the project is re-opened):
100100
- Run: `pipenv run flask run`
101-
- Run and restart the server on changes: `pipenv run flask run --reload`
101+
- Optional: Use overmind to start frontend and backend servers with `overmind run start`: See frontend install doc for further documentation.
102102
9. Test the server and view coverage reports. Use of coverage reporting is recommended to indicate test suite completeness and to locate defunct code in the code base.
103103
- Run all the tests: `pipenv run pytest --cov .`
104104
- Run tests in a particular directory: `pipenv run pytest --cov [path to directory]`

Procfile.dev.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
backend: export FLASK_ENV=development && pipenv run flask run -p 5000
2+
backend_testing: export FLASK_ENV=testing && pipenv run flask run -p 5010 --reload
3+
frontend: cd ../dwellingly-app && PORT=3000 npm run start
4+
frontend_testing: cd ../dwellingly-app && export REACT_APP_PROXY=http://localhost:5010 && PORT=3010 npm run start

0 commit comments

Comments
 (0)