Skip to content

Syncthetic/syncthetic-angular-electron

Repository files navigation

Syncthetic Angular Electron

Quick boostrapping for Angular and Electron. Automatic updates are supplied with ElectronAutoUpdate if you publish and point the UpdateService to an ElectronAutoUpdateAPI

Prerequisites

interface Application {
 name: string
 version: string
 download: string
 additionalInfo?: {}
}

If you use MongoDB Stitch for your application, you can simply login with this application to manage all of your applications. i.e, change version information which causes applications using ElectronAutoUpdate to fire events if it's outdated.

Getting started

Clone the repository and install dependancies

git clone https://github.com/Syncthetic/syncthetic-angular-electron && cd syncthetic-angular-electron && npm i

Important!

Update the package.json file with your application information and author information, that would be this portion. This is necessary, as the UpdateService will pull the package name and version from package.json when attempting to find if new versions have been released.

{
  "name": "syncthetic-angular-electron",
  "version": "0.0.1",
  "description": "Boostrap angular and electron with auto-updates and clarity",
  "homepage": "https://github.com/Syncthetic/syncthetic-angular-electron",
  "author": {
    "name": "Justin Bess",
    "email": "code@justinbess.com"
  },

Configure the UpdateService

Open and edit the service located at src/app/services/update/update.service.ts On line 22 and 23, set the apiDomain and apiBase

  private apiDomain: string = http://api.my-website.com/
  private apiBase: string = 'api/'

The above would issue a query to http://api.my-website.com/api/application/application-name, which if configured correctly as an ElectronAutoUpdateAPI, will allow you to pull the applications latest information from the database.

Optional Configuration

A top level alert notification is rendered for application updates. You can configure the component and view for the alerts in the src/app/components/alerts folder

About

Quick boostrapping for Angular and Electron. Automatic updates are supplied with ElectronAutoUpdate

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors