db-stops-search
Version:
Search through all stops/stations known by Deutsche Bahn's HAFAS API.
51 lines (30 loc) • 2.06 kB
Markdown
# db-stops-search
**Search through all [stops/stations known by Deutsche Bahn's HAFAS API](https://npmjs.com/package/db-hafas-stations).**
[](https://www.npmjs.com/package/db-stops-search)


[](https://github.com/sponsors/derhuerst)
[](https://twitter.com/derhuerst)
Formats and imports the stops into a [Meilisearch](https://meilisearch.com) instance.
## Installation
```shell
npm install -g db-stops-search
```
Or use [`npx`](https://npmjs.com/package/npx). ✨
## Usage
First, configure & run a [Meilisearch](https://meilisearch.com) instance.
Then use `db-stops-search` to import data into it:
```shell
# configure how to connect to Meilisearch (optional):
export MEILISEARCH_URL="https://my-meilisearch-instance.example.org"
# configure the name of the search index to create (defaults to "db-stops-search"):
export MEILISEARCH_INDEX="db-stops-2022-08-17"
# import the data into Meilisearch
npx db-stops-search
```
The import process might look like this:
[](https://asciinema.org/a/522158)
If it succeeded and you're not running Meilisearch in production mode, you can access its [search preview](https://docs.meilisearch.com/learn/what_is_meilisearch/search_preview.html) in the browser:

## Contributing
If you have a question or need support using `db-stops-search`, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, use [the issues page](https://github.com/derhuerst/db-stops-search/issues).