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

Proposal: Controller Generation in Sequelize #1360

Open
flyyuan opened this issue Aug 10, 2023 · 0 comments
Open

Proposal: Controller Generation in Sequelize #1360

flyyuan opened this issue Aug 10, 2023 · 0 comments

Comments

@flyyuan
Copy link

flyyuan commented Aug 10, 2023

Proposal: Controller Generation in Sequelize

Inspired by the Rails framework, I'm considering introducing a feature in Sequelize that would allow users to generate controllers alongside models, streamlining the development process for many.

Command and Output:

The envisioned command would be:

sequelize generate:model User -c koa

If the -c flag is followed by koa, Sequelize would generate a Koa-compatible controller. Similarly, specifying other frameworks like express or fastify would generate controllers tailored for them.

Implementation Plan:

  1. Templating:

    • Create templates for popular Node.js web frameworks (e.g., Express, Koa, Fastify).
    • Allow users to specify their framework of choice during generation.
  2. Configuration Options:

    • Offer customization options for the generated controllers.
  3. Basic CRUD Logic:

    • Include essential CRUD operations in the generated controllers.

Seeking Preliminary Discussion:

Before diving into the development, I wanted to discuss this with you to gauge its feasibility and alignment with Sequelize's vision. I'm fully prepared to develop this PR, but I believe a preliminary discussion would be invaluable.

Your insights and feedback would be greatly appreciated. If this proposal aligns with Sequelize's direction, I'm eager to start working on it and contribute to the project.

Thank you for your time and consideration.

Tasks

No tasks being tracked yet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant