Coder Social home page Coder Social logo

przucidlo / electron-typescript-react-typeorm-sqlite-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
14.0 3.0 5.0 1.17 MB

A boilerplate for creating projects that want to use typeorm with sqlite3 inside electron.

HTML 7.47% TypeScript 45.46% JavaScript 47.07%
react typeorm electron electron-builder typescript typescript-boilerplate webpack babel hot-reload hot-module-replacement

electron-typescript-react-typeorm-sqlite-boilerplate's Introduction

About

Stack contains:

  • Typescript
  • Electron
  • React
  • TypeORM
  • SQLite3
  • Webpack
  • Babel

This stack comes with few limitations due to bug(?) in webpack which causes usage of TypeORM on renderer process to be almost impossible.(#4210)


The main idea of this stack is to use TypeORM on main process and communicate with renderer process by usage of remote/ipc calls.

Compatibility table

OS Status
Windows ✔️
Linux ✔️
Mac ✔️

Installation

  1. Clone this repository
  2. Remove .gitignore
  3. Call npm install to download required dependencies.
  4. Have fun :)

Usage

npm start

Starts your app in development mode using the same terminal for electron and webpack-dev-server

npm build

Bundles your app using production config.

npm run build:dev

Bundles your app using development config.

npm run package

Packages your app using electron-builder (config can be found in ./electron-builder.json)

npm run start:dev

Starts webpack-dev-server.

npm run start:electron

Starts electron instance in development mode.

Troubleshooting

  • Webpack-dev-server doesn't notice any changes I make to code.
  • React-hot-loader doesn't work.

Make sure that you have enough watchers.

  • Webpack warns about not being able to find database drivers in console.

TypeORM has conditional dependencies on other databases (mysql, mssql...) and webpack has no idea which one are needed and tries to load all of them and warnings pop out.

TODO

  • Improve the sample code.
  • Setup tests.

electron-typescript-react-typeorm-sqlite-boilerplate's People

Contributors

dependabot[bot] avatar przucidlo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

electron-typescript-react-typeorm-sqlite-boilerplate's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.