@reignmodule/push-hit
TypeScript icon, indicating that this package has built-in type declarations

0.3.4 • Public • Published

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 is false ignore send messages.
  • environment (string, Optional, Default: process.env.NODE_ENV): Default is process.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"):

Readme

Keywords

none

Package Sidebar

Install

npm i @reignmodule/push-hit

Weekly Downloads

1

Version

0.3.4

License

ISC

Unpacked Size

10.5 kB

Total Files

4

Last publish

Collaborators

  • jondotsoy
  • reigncl