fastify-cli icon indicating copy to clipboard operation
fastify-cli copied to clipboard

Allow add plugin to main process scope ( not app.js scope ), without eject the project.

Open halfong opened this issue 1 year ago • 1 comments

Prerequisites

  • [X] I have written a descriptive issue title
  • [X] I have searched existing issues to ensure the feature has not already been requested

🚀 Feature Proposal

Say I have a plugin run a headless browser to scrawl things It's better to be a singleton instance through the whole nodejs process scope, not the app scope( for each request ).

For now, I should eject the server.js and add the plugin in it.

Is it possible to add process based plugin without eject ?

Motivation

No response

Example

No response

halfong avatar Aug 10 '23 08:08 halfong

hum, you can explain me more or show exemple for it in code!

yazaldefilimone avatar Aug 10 '23 18:08 yazaldefilimone