Skip to content

iamtraction/quark

Repository files navigation

Quark

A lightweight Electron update server for all your applications that proxies downloads from GitHub releases.

Features

  • 📦 Multiple application support
  • 🚀 Proxy downloads from GitHub releases
  • 🔒 Support for private repositories
  • 🔄 Automatic platform detection
  • 🔍 Simple configuration

Installation

# clone the repository
git clone https://github.com/iamtraction/quark.git
cd quark

# install dependencies
npm install

# build quark
npm run build

# copy example config
cp .env.example .env
cp config.example.yaml config.yaml

Configuration

  • Edit config.yaml and configure your Electron applications.
  • Edit .env file and set the environment variables you need.

Environment Variables

  • PORT: Server port (default: 3000)
  • HOST: Server host (default: 0.0.0.0)
  • URL: URL where this server is deployed
  • GITHUB_TOKEN: GitHub PAT to proxy downloads from private GitHub repositories
  • CONFIG_PATH: Path to config file (default: ./config.yaml)
  • LOG_LEVEL: See logs less than or equal to this severity (default: info)

Usage

# start the server
npm start

API Endpoints

Application Overview

Get an overview of the application. It also lists all the available release assets for the latest version.

GET /:application

Download Application

Download the latest version of the application. Automatically detects the platform from the user agent.

GET /:application/download
Query Param Description Example
format The extension of format you want to download dmg, pkg, zip, etc.

Download Application for Platform

Download the latest version of the application for the specified platform. I recommend using either process.platform or os.platform() to retrieve the platform.

GET /:application/download/:platform
Query Param Description Example
format The extension of format you want to download dmg, pkg, zip, etc.

Check for Updates

Check whether an update is available for the specified platform. If an update isn't available it'll return the 204: No Content status.

GET /:application/update/:platform/:version

Get Windows RELEASES File

This endpoint serves a cached RELEASES file required by Squirrel.Windows (the auto-update system used by Electron applications). The file contains a download link to the .nupkg package that contains the application update.

GET /:application/:version/RELEASES

Development

# install dependencies
npm install

# run linter
npm run lint

# build quark
npm run build

# start development server
npm run watch

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feat/magic)
  3. Commit your changes (git commit -m "feat: add some magic")
  4. Push to the branch (git push origin feat/magic)
  5. Open a Pull Request

License

MIT © iamtraction

About

A lightweight Electron update server for all your apps.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published