pingme-live
v1.0.4
Published
Send live ping messages with stored username via API
Readme
PingMe Live
Download the PingMe Live app, register in the app and create your username.
Add PingMe Live to your project:
npm install --save pingme-live- Run the setup script to add the username to your project env files:
npx pingme-setup
# or, if installed locally:
node ./node_modules/.bin/pingme-setup
# or (when developing locally)
node ./bin/setup.jsThe setup script will add VITE_PINGME_USERNAME and REACT_APP_PINGME_USERNAME to existing .env* files (e.g., .env.local, .env.production). If no env files exist it will create a .env.
Example usage (CommonJS):
const PingMe = require('pingme-live');
PingMe('Hello from my app')
.then(res => console.log('sent'))
.catch(err => console.error(err));Example usage (ES module / browser):
import PingMe from 'pingme-live';
PingMe('Hello from the browser')
.then(res => console.log('sent'))
.catch(console.error);