项目作者: yoshuawuyts

项目描述 :
Aggregate crash reports for Electron apps
高级语言: JavaScript
项目地址: git://github.com/yoshuawuyts/electron-crash-report-service.git
创建时间: 2017-01-14T17:17:33Z
项目社区:https://github.com/yoshuawuyts/electron-crash-report-service

开源协议:MIT License

下载


electron-crash-report-service


Aggregate crash reports for Electron applications



Usage

Commands

  1. $ npm install # Install dependencies
  2. $ npm start # Start service in development

Client code

  1. var electron = require('electron')
  2. electron.crashReporter.start({
  3. companyName: '<company-name>',
  4. productName: '<product-name>',
  5. submitURL: '<reporter-url>'
  6. })

Environment variables

  1. PORT [80] # Set the port the service should listen to
  2. STORAGE_PATH [/var/crash-reports] # Location to store crash reports
  3. NODE_ENV [production] # production|development

Routes

  1. /crash-report POST Submit a new crash report
  2. /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

  1. [Unit]
  2. Description=electron-crash-report-service
  3. Requires=network-online.target
  4. After=network-online.target
  5. [Service]
  6. Slice=machine.slice
  7. Delegate=true
  8. CPUQuota=10%
  9. MemoryLimit=1G
  10. Environment=PORT=80
  11. Environment=STORAGE_PATH=/var/crash-reports
  12. Environment=NODE_ENV=production
  13. ExecStart=/usr/bin/rkt run --inherit-env /images/electron-crash-report-service.aci
  14. ExecStopPost=/usr/bin/rkt gc --mark-only
  15. KillMode=mixed
  16. Restart=always

You can then run it using systemctl:

  1. $ sudo systemctl start etcd.service
  2. $ sudo systemctl stop etcd.service
  3. $ sudo systemctl restart etcd.service

See Also

License

MIT