Skip to content

Commit 79d1f10

Browse files
Fixing the connection to memcached
1 parent 3fe8e7b commit 79d1f10

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

conf/memcached.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
-u memcache
99

1010
# Listening IP Address
11-
-l 127.0.0.1
11+
-l 0.0.0.0

src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,16 @@ import createUsersEndpoint from "./endpoints/users";
1616
import {createCacheEndpoint} from "./endpoints/cache";
1717
import {Memcached} from "memcached-node";
1818

19+
let productionCache = new Memcached("127.0.0.1:11211");
20+
productionCache.createPool();
21+
1922
let productionDataLayer = new ProductionDataLayer(productionFirestore)
2023
const port = Number(process.env.PORT || 8080);
2124
const server = fastify({logger: true});
2225
server.register(fastifySensible);
2326
registerSwagger(server);
2427
registerCorsHandler(server);
2528

26-
let productionCache = new Memcached("127.0.0.1:11211");
2729
let prodJwtVerifier = getJwtVerifier(productionCache);
2830
addRoutes(
2931
server,

0 commit comments

Comments
 (0)