Skip to content

Commit

Permalink
chore: upgrade to fastify 4
Browse files Browse the repository at this point in the history
  • Loading branch information
kevcodez authored and felixmosh committed Jun 12, 2022
1 parent 97e2fc8 commit 1007e5d
Show file tree
Hide file tree
Showing 6 changed files with 242 additions and 123 deletions.
2 changes: 1 addition & 1 deletion examples/with-fastify-auth/cookieAuth.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { FastifyAdapter } = require('@bull-board/fastify');
const { createBullBoard } = require('@bull-board/api');
const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter');
const pointOfView = require('point-of-view');
const pointOfView = require('@fastify/view');
const path = require('path');

module.exports.cookieAuth = function cookieAuth(fastify, { queue }, next) {
Expand Down
2 changes: 1 addition & 1 deletion examples/with-fastify-auth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const run = async () => {
});
});

await app.listen(3000);
await app.listen({ port: 3000 });
// eslint-disable-next-line no-console
console.log('Running on 3000...');
console.log('For the UI with basic auth, open http://localhost:3000/basic/login');
Expand Down
2 changes: 1 addition & 1 deletion examples/with-fastify/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const run = async () => {
});
});

await app.listen(3000);
await app.listen({ port: 3000 });
// eslint-disable-next-line no-console
console.log('Running on 3000...');
console.log('For the UI, open http://localhost:3000/ui');
Expand Down
8 changes: 4 additions & 4 deletions packages/fastify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
"dependencies": {
"@bull-board/api": "3.11.1",
"@bull-board/ui": "3.11.1",
"@fastify/static": "^5.0.1",
"ejs": "^3.1.7",
"point-of-view": "^5.2.0"
"@fastify/static": "^6.4.0",
"ejs": "^3.1.8",
"@fastify/view": "^7.0.0"
},
"devDependencies": {
"fastify": "^3.28.0"
"fastify": "^4.0.0"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/fastify/src/FastifyAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
import fastifyStatic from '@fastify/static';
import { FastifyInstance } from 'fastify';
import { HTTPMethods } from 'fastify/types/utils';
import pointOfView from 'point-of-view';
import pointOfView from '@fastify/view';

type FastifyRouteDef = {
method: HTTPMethods;
Expand Down
Loading

0 comments on commit 1007e5d

Please sign in to comment.