Skip to content

Commit

Permalink
separate the redis database
Browse files Browse the repository at this point in the history
  • Loading branch information
guimasharing committed Aug 9, 2023
1 parent e3b22ce commit cb077d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
docker run -p 27017:27017 --name mongo -d mongodb/mongodb-community-server:latest

# Redis
docker run -p 6379:6379 --name redis -d redis/redis-stack-server:latest
docker run -p 6379:6379 --name redisJson -d redis/redis-stack-server:latest
docker run -p 6380:6379 --name redisGeohash -d redis/redis-stack-server:latest
3 changes: 1 addition & 2 deletions src/Redis/RedisGeohash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class RedisGeohash extends TestDatabase {
}

async connect(uri?: string | undefined): Promise<void> {
this.redis = createClient({ url: uri ?? this.uri ?? 'redis://127.0.0.1:6379' })
this.redis = createClient({ url: uri ?? this.uri ?? 'redis://127.0.0.1:6380' })
await this.redis.connect();
this.repository = new Repository(locationSchema, this.redis)
}
Expand All @@ -38,7 +38,6 @@ export class RedisGeohash extends TestDatabase {
await this.redis.GEOADD('location', docs);
}
async prepare(): Promise<void> {
// await this.repository!.createIndex();
}

async usageReport(): Promise<Object> {
Expand Down

0 comments on commit cb077d1

Please sign in to comment.