1.0.27 • Published 4 years ago
hermeslib v1.0.27
HERMESJS
- Library for polling Hermes messages.
Install
npm install hermeslib
or
yarn add hermeslibUsage
import React from "react";
import "react-notifications/lib/notifications.css";
import { Cron } from "hermeslib";
function App() {
return (
<div>
<Cron
endpoint="https://localhost:8080/poll/{recipient}"
cronTime="0/30 * * * * *" //Run every 30 seconds
defaultNotification
callback={(err, data) =>
console.log(`error: ${err}, data: ${data}`)
}
/>
</div>
);
}
export default App;Properties
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| endpoint | string | true | - | Endpoint to poll messages |
| cronTime | string | false | * * * * * | Cron time string format (https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules) |
| callback | function | false | - | Function that will be called after receiving a message. (error: boolean, data: object) |
| defaultNotification | boolean | false | false | Displays the default notifications imbedded in the library |
Default Notification
1.0.19
4 years ago
1.0.18
4 years ago
1.0.16
4 years ago
1.0.9
4 years ago
1.0.8
4 years ago
1.0.22
4 years ago
1.0.21
4 years ago
1.0.20
4 years ago
1.0.26
4 years ago
1.0.25
4 years ago
1.0.24
4 years ago
1.0.23
4 years ago
1.0.27
4 years ago
1.0.11
4 years ago
1.0.10
4 years ago
1.0.14
4 years ago
1.0.12
4 years ago
1.0.7
4 years ago
1.0.6
4 years ago
1.0.5
4 years ago
1.0.4
4 years ago
1.0.3
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago