Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding plugin for auto loading the routes fastify #925

Merged
merged 2 commits into from May 7, 2018

Conversation

israeleriston
Copy link
Contributor

Checklist

  • run npm run test and npm run benchmark
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message and code follows Code of conduct

Copy link
Member

@delvedor delvedor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! There is already fastify-autoload, what is the difference?

@israeleriston
Copy link
Contributor Author

hi @delvedor, I know the plugin of auto upload, the difference for my, is that you have the power to auto-load the routes, option to view a table with all the routes (if you want) at the end of loading the app, an option to envelop the handlers, your routes, and the next versions (not enough time to finish), I will implement a form of loading, validation scheme and everything referring to the routes, without much concern, what you need is to expose a javascript function with all these Options that the plugin will take care of everything, in fact I want to create others, to compose with this one and with 3 plugins at maximum, you can have a boilerplate fast, complete and easy, to help beginners, is a help the staff here in brazil that is starting with fastify, by the way, they are loving it.

@@ -70,3 +70,4 @@ Plugins maintained by the fastify team are listed under [Core](#core) while plug
- [`fastify-sse`](https://github.com/lolo32/fastify-sse) to provide Server-Sent Events with `reply.sse( … )` to Fastify.
- [`fastify-tls-keygen`](https://gitlab.com/sebdeckers/fastify-tls-keygen) Automatically generate a browser-compatible, trusted, self-signed, localhost-only, TLS certificate.
- [`fastify-ws`](https://github.com/gj/fastify-ws) WebSocket integration for Fastify — with support for WebSocket lifecycle hooks instead of a single handler function. Built upon [ws](https://github.com/websockets/ws) and [uws](https://github.com/uNetworking/bindings/tree/master/nodejs).
- [`fastify-register-routes`](https://github.com/israeleriston/fastify-register-routes) Plugin that contains an scheme the auto-loading file, auto registration the routes and a wrap handler to a router.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Plugin to automatically load routes from a specified path and optionally limit loaded file names by a regular expression."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsumners thank's for your observation, done!

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mcollina mcollina merged commit 747ce5c into fastify:master May 7, 2018
@delvedor delvedor added documentation Improvements or additions to documentation plugin Identify a pr to the doc that adds a plugin. labels May 21, 2018
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation plugin Identify a pr to the doc that adds a plugin.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants