Skip to content

Commit fb32641

Browse files
committed
Fix readme
1 parent 36cf5a9 commit fb32641

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,16 @@ npm i -S simple-reverse-geocoder
1919

2020
[Try on Tonic](https://tonicdev.com/npm/simple-reverse-geocoder)
2121
```js
22-
import meitrack from 'simple-reverse-geocoder'
22+
import rg from 'simple-reverse-geocoder';
2323

24-
const rg = require('simple-reverse-geocoder');
24+
const loc = {type: 'Point', coordinates: [-70.5171743, -33.3608387]};
25+
rg.getAddress(loc).then(console.log); // 'Del Candil 665-701, Lo Barnechea'
26+
27+
// Add redis cache
28+
import redis from 'redis';
2529

30+
const client = redis.createClient();
31+
rg.setCache(client);
2632
const loc = {type: 'Point', coordinates: [-70.5171743, -33.3608387]};
2733
rg.getAddress(loc).then(console.log); // 'Del Candil 665-701, Lo Barnechea'
2834
```

0 commit comments

Comments
 (0)