Bertrand Boustany
1 min readMar 4, 2017

--

You can simplify this process by using concurrently and wait-on command line tools.

Here are the start scripts I use

“react-start”: “$(npm bin)/react-scripts start”,
“electron-start”: “ELECTRON_DEV=1 $(npm bin)/electron .”,
“start”: “$(npm bin)/concurrently ‘npm react-start’ ‘$(npm bin)/wait-on http://localhost:3000/ && npm electron-start’”,

In other words, it runs concurrently react-scripts start and electron . but by adding wait-on http://localhost:3000/ we make sure that the webpack server is running before starting electron.

By doing so you can remove the electron-wait-react script (replaced by wait-on) and the procfile / foreman (replaced by concurrently).

--

--

Bertrand Boustany

Software engineer interested in Developer Experience. Helped build korbit.co.kr zepl.com prose.com & may.fr - currently building linotte.dev