
Product
Introducing Socket Fix for Safe, Automated Dependency Upgrades
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
addok-cluster
Advanced tools
A very fast and efficient way to use addok geocoding capabilities in your Node.js process.
AbortController
npm install addok-cluster
import {createCluster} from 'addok-cluster'
const cluster = await createCluster(options)
Environment variable name | Option name | Description |
---|---|---|
PYTHON_PATH | pythonPath | Path to python executable to use |
ADDOK_CLUSTER_NUM_NODES | numNodes | Number of nodes to instantiate (default to number of CPUs) |
ADDOK_CONFIG_MODULE | addokConfigModule | Path to addok configuration file |
ADDOK_REDIS_URL | addokRedisUrl | Connection string to addok Redis instance (can be an array) |
ADDOK_REDIS_DATA_DIR | redisDataDir | Path to Redis data directory (enable managed Redis) |
ADDOK_REDIS_STARTUP_TIMEOUT | redisStartupTimeout | Duration in milliseconds allowed to Redis to start (managed Redis only) |
const params = {
q: '1 rue de la paix 75002 Paris',
autocomplete: false,
lon: null,
lat: null,
limit: 5,
filters: {
postcode: '75002',
citycode: '75102'
}
}
const options = {
priority: 'medium',
signal: null
}
const results = await cluster.geocode(params, options)
Param | Description | Default |
---|---|---|
q | Text input to geocode (required) | |
autocomplete | Auto-complete mode (boolean ) | false |
lon , lat | Coordinates of reference position | |
limit | Number of returned results | 5 |
filters | Additional filters (depend on addok config) | {} |
const params = {
lon: null,
lat: null,
limit: 5,
filters: {
type: 'housenumber'
}
}
const options = {
priority: 'high',
signal: null
}
const results = await cluster.reverse(params, options)
Param | Description | Default |
---|---|---|
lon , lat | Coordinates of reference position (required) | |
limit | Number of returned results | 5 |
filters | Additional filters (depend on addok config) | {} |
priority
: low
| medium
(default) | high
Define the priority level of the request. Requests are processed following FIFO rule, from high to low.
signal
: AbortSignal
instance (optional)
If an AbortSignal
instance is provided, its status is checked just before forwarding to addok.
cluster.end()
This software is maintained by Living Data, thanks to the support of partners such as Etalab (API Adresse) and IGN (Géoplateforme).
FAQs
Clustering addok geocoding capabilities from your Node.js process
We found that addok-cluster demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.