Skip to content

Commit

Permalink
Update fastify examples
Browse files Browse the repository at this point in the history
  • Loading branch information
felixmosh committed May 3, 2022
1 parent 9473e6a commit 7770850
Show file tree
Hide file tree
Showing 7 changed files with 244 additions and 300 deletions.
2 changes: 1 addition & 1 deletion examples/with-fastify-auth/basicAuth.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports.basicAuth = function basicAuth(fastify, { queue }, next) {
}
}

fastify.register(require('fastify-basic-auth'), { validate, authenticate });
fastify.register(require('@fastify/basic-auth'), { validate, authenticate });

fastify.after(() => {
const serverAdapter = new FastifyAdapter();
Expand Down
4 changes: 2 additions & 2 deletions examples/with-fastify-auth/cookieAuth.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ const pointOfView = require('point-of-view');
const path = require('path');

module.exports.cookieAuth = function cookieAuth(fastify, { queue }, next) {
fastify.register(require('fastify-cookie'), {
fastify.register(require('@fastify/cookie'), {
secret: 'my-secret-key', // for cookies signature
});

fastify.register(require('fastify-jwt'), {
fastify.register(require('@fastify/jwt'), {
secret: 'super-secret',
cookie: {
cookieName: 'token',
Expand Down
2 changes: 2 additions & 0 deletions examples/with-fastify-auth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ async function setupBullMQProcessor(queueName) {
}

return { jobId: `This is the return value of job (${job.id})` };
}, {
connection: redisOptions,
});
}

Expand Down
14 changes: 7 additions & 7 deletions examples/with-fastify-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
"author": "felixmosh",
"license": "ISC",
"dependencies": {
"@bull-board/fastify": "^3.10.4",
"bullmq": "^1.80.4",
"fastify": "^3.28.0",
"fastify-basic-auth": "^2.2.0",
"fastify-cookie": "^5.6.1",
"fastify-jwt": "^3.0.1"
"@bull-board/fastify": "^3.10.7",
"@fastify/basic-auth": "^3.0.1",
"@fastify/cookie": "^6.0.0",
"@fastify/jwt": "^5.0.1",
"bullmq": "^1.81.1",
"fastify": "^3.29.0"
},
"devDependencies": {
"nodemon": "^2.0.15"
"nodemon": "^2.0.16"
}
}
Loading

0 comments on commit 7770850

Please sign in to comment.