npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

geo-engine-node

v1.1.3

Published

SDK oficial para Geo-Engine...

Readme

📦 Geo-Engine Node.js SDK

NPM Version License Types Size

Cliente oficial de alto rendimiento para interactuar con la plataforma Geo-Engine.
Procesa ubicaciones en tiempo real, detecta cruces de geocercas y dispara webhooks en milisegundos.


✨ Características

  • 🚀 Rendimiento: Diseñado para manejar alta ingestión de datos.
  • 🛡️ Type-Safe: Incluye definiciones TypeScript (.d.ts) nativas.
  • 📦 Híbrido: Funciona con require (CommonJS) y import (ES Modules).
  • Ligero: Cero dependencias pesadas.

🚀 Instalación

npm install geo-engine-node

⚡ Inicio Rápido

Geo-Engine soporta tanto sintaxis moderna como clásica.

Opción A: ES Modules (Recomendado)

import GeoEngine from 'geo-engine-node';

// Inicializa con tu API Key
const geo = new GeoEngine('sk_test_12345abcdef');

// Envía una coordenada (ID, Latitud, Longitud)
try {
  const res = await geo.sendLocation('camion-01', 19.4326, -99.1332);
  console.log('✅ Ubicación procesada:', res);
} catch (err) {
  console.error('❌ Error:', err.message);
}

Opción B: CommonJS (Legacy)

const GeoEngine = require('geo-engine-node');

const geo = new GeoEngine('sk_test_...');

📚 Referencia de la API

new GeoEngine(apiKey, [options])

Crea una nueva instancia del cliente.

Parámetros:

  • apiKey (string): Tu clave secreta de API.

  • options (object, opcional):

    • timeout: Tiempo de espera en ms (default: 10000)
    • ingestUrl: URL personalizada (útil para proxies o testing)
    • managementUrl: URL del servicio de administración

geo.sendLocation(deviceId, lat, lng)

Envía un punto de rastreo al motor de ingestión. El sistema evaluará automáticamente las reglas espaciales.

Parámetros:

  • deviceId (string): ID único (placa, UUID, etc).
  • lat (number): Latitud decimal (Ej: 19.43)
  • lng (number): Longitud decimal (Ej: -99.13)

geo.createGeofence(name, coordinates, webhookUrl)

Crea dinámicamente una zona de monitoreo. Geo-Engine enviará un POST a tu webhook cuando un activo entre o salga.

Ejemplo:

// Definir polígono: Array de [Lat, Lng]
const zona = [
  [19.42, -99.16],
  [19.41, -99.16],
  [19.41, -99.15],
  [19.42, -99.15]
];

await geo.createGeofence(
  'Almacén Central',
  zona,
  'https://mi-api.com/webhooks/geofence-alert'
);

🧪 Desarrollo Local

Ideal para probar con tu propia instancia de Geo-Engine corriendo en Docker o Localhost.

const geo = new GeoEngine('local-key', {
  ingestUrl: 'http://localhost:8080',
  managementUrl: 'http://localhost:8081'
});

📄 Licencia

MIT © Geo-Engine Team