@reignmodule/push-hit
v0.3.4
Published
Simple client to sent messages at web services.
Readme
push-hit
Simple client to sent messages at web services.
Example
const pushHit = createPushHit({
baseUrl: `http://my-hit-server:3000`,
inervalPush: '2ms'
});
pushHit.push({
_index: 'abc',
myData,
});API createPushHit(Options)
Options:
- baseUrl (
string): Url base to send messages. - enabled (
boolean, Optional, Default:true): If isfalseignore send messages. - environment (
string, Optional, Default:process.env.NODE_ENV): Default isprocess.env. - target (
string, Optional): - inervalPush (
string, Optional, Default:"5s"): Time to wait the next sent. - indexDateStrategy (
boolean, Optional, Default:true): Use to index with date strategy, Ej. _index =abc=> _index =abc-2020.01.01. - indexDateTimeZone (
string, Optional, Default:America/Santiago): Use to define the timezone. See List of tz database time zones. - indexDateFormat (
string, Optional, Default:"YYYY.MM.DD"):
