-
-
Notifications
You must be signed in to change notification settings - Fork 791
New Plugin: feathers-service-reloader - Hot Service Reloading for FeathersJS v5 (Zero Dependency) #3547
-
Hi everyone,
I’ve just published a new plugin called feathers-service-reloader, designed specifically for FeathersJS v5. This plugin is zero dependency and allows real-time reloading of services in development mode, enabling you to make changes to your service files without having to restart the entire application. This can save significant time, especially as your project grows and you have multiple services.
Key Features:
- Zero dependencies for lightweight and fast performance.
- Automatically reloads modified FeathersJS services in milliseconds.
- Clears require cache to ensure changes are applied immediately.
- Removes and reloads AJV schemas dynamically.
- Integrates easily with existing FeathersJS v5 applications.
Usage
The plugin can be used alongside nodemon to ignore the services folder, allowing feathers-service-reloader to handle reloading those files automatically. Here’s an example dev script for your package.json:
"scripts": { "dev": "nodemon --ignore src/services/ -x ts-node src/index.ts" }
To use the plugin, add feathers-service-reloader as a plugin to your FeathersJS app in development mode:
import { serviceReloader } from 'feathers-service-reloader'; if (process.env.NODE_ENV === 'development') { serviceReloader(app) }
This plugin is intended for development use only and helps streamline your workflow by automatically handling changes in services files without needing to use nodemon to restart your app. You can find the npm package and detailed instructions here: feathers-service-reloader on npm.
I’d love to hear your feedback and any suggestions for improvement. Feel free to try it out and let me know what you think!
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments
-
Thank you for sharing! I'll really have to find an easier way to add it to https://feathersjs.com/ecosystem/ but for now you are welcome to add it to https://github.com/feathersjs/awesome-feathersjs
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks @daffl 🙏 If you want to add this feature as a package to the main project, I would like to work on it. It may be a feature that makes a difference for the development environment compared to alternative tools.
Beta Was this translation helpful? Give feedback.