Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

New Plugin: feathers-service-reloader - Hot Service Reloading for FeathersJS v5 (Zero Dependency) #3547

indatawetrust started this conversation in Show and tell
Discussion options

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!

You must be logged in to vote

Replies: 2 comments

Comment options

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

You must be logged in to vote
0 replies
Comment options

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.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /