Starter
The starters help you kick off into a project so you can get started right away.
Django
TODO:
- cookiecutter for project layout templating?
- django-environ?
Initialize your django application in your project folder and change base layout.
1 2 3 4 | |
Create multiple environment specific settings and requirements files.
1 2 3 | |
You can create specific settings which imports base.py, eg. local.py, staging.py or production.py:
1 2 3 | |
Do the same with your requirements.
Start an app:
1 | |
React Electron
Initialize your react client in your project folder and cd into the client folder.
1 2 | |
From there install electron and a package to detect if it runs in a development or production environment.
1 2 | |
We create the main electron script in public/ as electron.js and enter the following code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | |
In package.json you can configure this script as the starting point.
1 2 3 | |
Now we configure the behavior for starting our development environment and we use two more packages for it.
1 | |
The configuration is done in the package.json again.
1 2 3 4 5 6 | |
To run the app in development mode, you can use npm run dev.