README
despatch
This module has a goal of somehow getting a network request to your backend from your Electron app. Given everything is broken but the computer still has an internet connection we should still be able to phone home
API
phoneHome(url: string, logger: Logger)
Returns Promise<boolean>
.
The promise resolves with true
if we managed to phone home, please note that true
just means a network connection was
successful, not that it was actually to your backend, if someone is intercepting network requests then we will return true
here all the same.
Example
import { phoneHome } from 'despatch';
phoneHome('https://plz.mysite.com', console)
.then((success) => console.log('Phoned home:', success));