Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hyperloris/nestjs-tile38
Tile38 module for Nest framework (node.js)
https://github.com/hyperloris/nestjs-tile38
database geo geofences geospatial index javascript location nest nestjs nodejs spatial tile38 typescript
Last synced: 3 months ago
JSON representation
Tile38 module for Nest framework (node.js)
- Host: GitHub
- URL: https://github.com/hyperloris/nestjs-tile38
- Owner: hyperloris
- License: mit
- Created: 2022-09-01T15:49:13.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-19T12:29:58.000Z (4 months ago)
- Last Synced: 2024-10-28T22:43:53.317Z (3 months ago)
- Topics: database, geo, geofences, geospatial, index, javascript, location, nest, nestjs, nodejs, spatial, tile38, typescript
- Language: TypeScript
- Homepage:
- Size: 377 KB
- Stars: 12
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
## Description
[Tile38](https://tile38.com) module for [Nest](https://github.com/nestjs/nest). This package is based on [Tile38-ts](https://github.com/iwpnd/tile38-ts), so visit its documentation for any questions about the API.
## Installation
```bash
$ npm i --save nestjs-tile38 @iwpnd/tile38-ts
```## Quick Start
First, import the `Tile38Module` into your root module:
```ts
import { Module } from '@nestjs/common';
import { Tile38Module } from 'nestjs-tile38';@Module({
imports: [
Tile38Module.forRoot({
url: 'redis://localhost:9851',
}),
],
})
export class AppModule {}```
Second, inject the Tile38 client into any of your injectables by using the `InjectTile38` decorator:
```ts
import { Injectable } from '@nestjs/common';
import { InjectTile38 } from 'nestjs-tile38';
import { Tile38 } from '@iwpnd/tile38-ts';@Injectable()
export class AppService {
public constructor(@InjectTile38() private readonly tile38: Tile38) {}
}
```## License
Licensed under [MIT](./LICENSE).
## Acknowledgements
- [nestjs](https://nestjs.com)
- [tile38-ts](https://github.com/iwpnd/tile38-ts)