judoscale-fastify
v1.3.0
Published
Fastify plugin for the Judoscale autoscaler
Downloads
66
Readme
Judoscale for Fastify
Official Judoscale adapter package for Fastify applications.
Set up your Fastify app for autoscaling
- Install the judoscale-fastify package:
npm install judoscale-fastify --save
- Import and use the provided plugin:
Judoscale should be one of the first plugins for your app.
// ESM
import judoscale from 'judoscale-fastify'
// CommonJs
const judoscale = require('judoscale-fastify').default
// default configuration
fastify.register(judoscale)
// custom configuration
fastify.register(judoscale, {
log_level: 'debug',
})
Troubleshooting
Once installed, you should see something like this in your development log:
[Judoscale] Reporter not started: JUDOSCALE_URL is not set
In production, run heroku logs -t | grep Judoscale
, and you should see something like this:
[Judoscale] Reporter starting, will report every 10 seconds
If you don't see either of these, ensure "judoscale-express" is in your Package.lock
file, and restart your app.
You can see more detailed (debug) logging by setting JUDOSCALE_LOG_LEVEL
on your Heroku app:
heroku config:set JUDOSCALE_LOG_LEVEL=debug
Reach out to [email protected] if you run into any other problems.