Electron / ReactJS / ExpressJS / LokiJS boilerplate for desktop apps
Simple user management app with local database (based on LokiJS)
Based on Electron quick start: https://electronjs.org/docs/tutorial/quick-start
Electron app path: './public/electron.js'
API based on ExpressJS: https://expressjs.com/
ExpressJS app path: './public/server'
LokiJS is a fast, in-memory document-oriented datastore for node.js. You can read more here: http://lokijs.org/
Based on https://github.com/facebook/create-react-app
ReactJS app path: './src'
Dependiencies:
redux
- Predictable state container for JavaScript apps https://github.com/reactjs/reduxredux-thunk
- Thunk middleware for Redux https://github.com/gaearon/redux-thunkredux-axios-middleware
- Redux middleware for fetching data with axios HTTP client https://github.com/svrcekmichal/redux-axios-middlewareaxios
- Promise based HTTP client https://github.com/axios/axiosantd
- Ant design (A UI design language) https://github.com/ant-design/ant-designstyled-components
- https://github.com/styled-components/styled-componentsprop-types
- Runtime type checking for React props https://github.com/facebook/prop-types
Open terminal and clone repo:
git clone https://github.com/krystiankoper/electron-react-express-loki
Once the cloning is done, you can open your project folder:
cd electron-react-express-loki
Inside the newly created project, you can run some built-in commands using npm
or yarn
start
- for run client app on http://localhost:3000build
- for build client apptest
- for test client appeslint
- for run eslint on client appdev
- for run ExpressJS server on http://localhost:3001 and runnpm
commandelectron-dev
- for run Electron app in development mode (dev tools are available in this mode)electron-pack
- for release Electron app