English | Español
Electron-based app with React as frontend that connects to an Arduino using SerialPort.
You'll need Node AND Yarn installed.
# If you are using Windows
$ yarn global add windows-build-tools
$ cd pasetec/control-center
$ yarn installcontrol-center/
|-- public/
|-- utils/
|-- listeners.js
|-- pack.js
|-- src/
|-- actions/
|-- components/
|-- App.js
|-- .env
|-- main.js
public/: Public files of Create React Appactions/: Is like 'pages'App.js: Create React App home.env: There go the env vars. Follow.env.exampleto create itmain.js: Electron codelisteners.js: Electron requests to APIpack.js: Electron Packager config
When developing, you'll run the React server and the Electron app with the same command: $ yarn electron-dev. Also, you need a .env.test file (equal to .env, but with development variables).
Disclaimer: because of the use of native modules, you can only build the app for the same OS you're using. However, you can build for both ia32 and x64. To achieve this, there are two dependencies that will rebuild the modules and other that will pack the app: Electron Rebuild and Electron Packager.
To build the app, you just run this command:
$ yarn electron-packIf you want to build for a arch different that the one you have on your computer:
$ yarn electron-pack --arch=ARCH