Comments (2)
Hello! My bad, the documentation is wrong, you need to wrap the .use
call inside curly brackets if you are calling it inside an after
block.
fastify
.register(require('fastify-express'))
.after(() => { fastify.use(router) })
Would you like to send a pr to fix the docs? :)
from fastify-express.
thanks :) pr sent
from fastify-express.
Related Issues (18)
- @fastify-express not working inside a plugin HOT 3
- `request.url` is mutated between `onRequest` and `onResponse` HOT 8
- Express wildcard routes override Fastify routes
- Swagger MIME type ('application/json') is not a supported stylesheet MIME type HOT 1
- Headers set by fastify are ignored if `express` handles request HOT 4
- If an express router handles a request, `onSend` hooks are not called HOT 9
- Express routes don't work when an Express router is added inside a plugin HOT 11
- FST_ERR_DEC_ALREADY_PRESENT when register fastify-express HOT 2
- Headers are `null` when using `.inject` HOT 14
- `fastify` should be added as a dep to `package.json` HOT 2
- When testing express application with inject, payload is always empty HOT 3
- Document that HTTP/2 is not supported when using fastify-express HOT 2
- FastifyError when using fastify-express with Nest.js and Fastify HOT 3
- Unable to get plugin working with typescript + require HOT 2
- Express middleware cannot access request.body HOT 7
- TypeScript declarations specify non-existent named export HOT 1
- Why the `expressHook` should be `preHandler` and not `preValidation`? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastify-express.