judoscale-fastify

1.3.0 • Public • Published

Judoscale for Fastify

Official Judoscale adapter package for Fastify applications.

Set up your Fastify app for autoscaling

  1. Install the judoscale-fastify package:
npm install judoscale-fastify --save
  1. 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 help@judoscale.com if you run into any other problems.

Package Sidebar

Install

npm i judoscale-fastify

Weekly Downloads

4

Version

1.3.0

License

MIT

Unpacked Size

4.76 kB

Total Files

6

Last publish

Collaborators

  • adamlogic