
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
addok-cluster
Advanced tools
A very fast and efficient way to use addok geocoding capabilities in your Node.js process.
AbortControllernpm 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) | {} |
Filter values can be provided as a string (single value) or as an array of strings (multiple values with OR logic):
const params = {
q: 'rue de la paix',
filters: {
// Single value (backward compatible)
type: 'street',
// Multiple values (OR logic)
postcode: ['75001', '75002', '75003']
}
}
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) | {} |
Filter values can be provided as a string (single value) or as an array of strings (multiple values with OR logic). See the Multiple filter values section for more details.
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 1 open source maintainer 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.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.