Quick boostrapping for Angular and Electron. Automatic updates are supplied with ElectronAutoUpdate if you publish and point the
UpdateServiceto an ElectronAutoUpdateAPI
- Configure an ElectronAutoUpdateAPI
- However you choose, add your application to the API, the recommended way is to use ElectronAutoUpdateClient
- Ensure that the application being inserted follows the
Application Interface
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.
Clone the repository and install dependancies
git clone https://github.com/Syncthetic/syncthetic-angular-electron && cd syncthetic-angular-electron && npm i
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"
},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.
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