
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
fastify-bundle
Advanced tools
A Fastify plugin that bundles commonly used plugins and utilities for developing a Fastify API
A comprehensive Fastify plugin that combines essential plugins and utilities commonly required for API development. This plugin provides a robust foundation for building scalable web services with a single registration. All included plugins can be easily customized through a global configuration object.
@fastify/cors: Configurable CORS support (included only when cors config is provided)@fastify/helmet: Security headers for protection against common web vulnerabilities@fastify/cookie: Cookie parsing and serialization (included only when cookie config is provided)@fastify/rate-limit: Request rate limiting for API protection (included only when rateLimit config is provided)@fastify/sensible: Adds useful utilities and HTTP helpers@fastify/swagger & @fastify/swagger-ui: API documentation (development mode only)npm install fastify-bundle
# or
pnpm add fastify-bundle
# or
yarn add fastify-bundle
The simplest way to use the plugin:
import fastify from 'fastify'
import fastifyBundle from 'fastify-bundle'
async function main() {
const server = fastify()
await server.register(fastifyBundle)
await server.start()
return server
}
main()
All bundled plugins can be configured through an options object when registering the core plugin. Optional plugins like cors, cookie, and rate-limit are only included when their respective configurations are provided. Type declarations are provided, so auto-complete and typechecking can be used when configuring the plugins.
import fastify from 'fastify'
import fastifyBundle from 'fastify-bundle'
async function main() {
const server = fastify()
await server.register({
// Include and configure CORS
cors: {
origin: ['https://your-domain.com'],
credentials: true,
},
// Include and configure cookie parsing
cookie: {
secret: "my-secret",
parseOptions: {},
},
// Include and configure rate limiting
rateLimit: {
max: 100,
timeWindow: '1 minute',
},
// Configure custom health check response
healthCheck: {
status: 'ok',
version: '1.0.0',
},
})
await server.start({
host: '0.0.0.0',
port: 8080,
})
return server
}
main()
The server will use default configurations for required plugins if no options are provided. Optional plugins are only included when their configuration is specified in the options object.
FAQs
A Fastify plugin that bundles commonly used plugins and utilities for developing a Fastify API
We found that fastify-bundle demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.