electron-crash-report-service
Aggregate crash reports for Electron applications
Usage
Commands
$ npm install # Install dependencies $ npm start # Start service in development
Client code
var electron = electroncrashReporterstart companyName: '<company-name>' productName: '<product-name>' submitURL: '<reporter-url>'
Environment variables
PORT [80] # Set the port the service should listen to STORAGE_PATH [/var/crash-reports] # Location to store crash reports NODE_ENV [production] # production|development
Routes
/crash-report POST Submit a new crash report/404 GET 404 handler
Peer Dependencies
None
Unit file
Save the unit file as /etc/systemd/system/electron-crash-reporter.service
,
and the application image as /images/electron-crash-report-service.aci
[Unit]Description=electron-crash-report-serviceRequires=network-online.targetAfter=network-online.target [Service]Slice=machine.sliceDelegate=trueCPUQuota=10%MemoryLimit=1GEnvironment=PORT=80Environment=STORAGE_PATH=/var/crash-reportsEnvironment=NODE_ENV=productionExecStart=/usr/bin/rkt run --inherit-env /images/electron-crash-report-service.aciExecStopPost=/usr/bin/rkt gc --mark-onlyKillMode=mixedRestart=always
You can then run it using systemctl
:
$ sudo systemctl start etcd.service$ sudo systemctl stop etcd.service$ sudo systemctl restart etcd.service