Skip to content

Commit 004547f

Browse files
authored
Merge pull request #9 from ahu/patch-1
upgrade the fastify & fastify-rate-limit to new version
2 parents cec21e2 + 633cd12 commit 004547f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: bot.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ let sendRoomWebHook = async function (contact, room) {
125125
return await _send(token);
126126
};
127127

128-
fastify.register(require("fastify-rate-limit"), {
128+
fastify.register(require("@fastify/rate-limit"), {
129129
max: 100,
130130
global: false,
131131
});
@@ -244,7 +244,7 @@ fastify.post(
244244

245245
let start = async function () {
246246
await bot.start();
247-
await fastify.listen(process.env.PORT || 3000);
247+
await fastify.listen({port : process.env.PORT || 3000});
248248
return console.log("listen " + process.env.PORT || 3000);
249249
};
250250

Diff for: package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"license": "ISC",
1111
"dependencies": {
1212
"dotenv": "^10.0.0",
13-
"fastify": "^3.19.1",
14-
"fastify-rate-limit": "^5.5.0",
13+
"fastify": "^4.7.0",
14+
"@fastify/rate-limit": "^7.6.0",
1515
"file-box": "^0.16.8",
1616
"hot-import": "^0.2.14",
1717
"lodash": "^4.17.21",

0 commit comments

Comments
 (0)