-
Notifications
You must be signed in to change notification settings - Fork 18
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
Express CLI #197
Comments
Hey! I agree. We have the generator package but it is quite old and doesn't follow the |
@wesleytodd I completely agree, and I would also like to join the Express team in creating and maintaining the brand-new CLI package. In the meantime, I am preparing some initial requirements and would like to share them with you here when it's done. |
I previously was excited about the idea of having the cli generator, but see the value less now. Id be interested to see your ideas about what it should do. Express is so lean that Im not certain what we would need to scaffold for folks. Previously the generator focused on scaffolding a server side rendered static html site using view engines. That's not as relevant today. Call it a lack of imagination on my part, but before you begin work @waleedtariq109 can you give an idea of what your vision is for a cli package? |
AFAIK, with the current roadmap, I share this vision too. But here's a random idea from my side: what if we just offer a CLI that lists all the projects in the current example folder and allows you to choose one of them to start a project? This way, you actually have tons of options out of the box. Maybe I'm going too far; it's just an idea. |
@jonchurch I've been preparing the initial proposal, and when it's ready, I'd be happy to share it here as it also reflects my vision for the CLI. |
Even if we get the most simple setup, I think the value of a generator for new users cannot be over stated. It is much different to say "create a file and copy this" vs |
@wesleytodd @jonchurch This has to be the Offical way of express |
what is this referring to? |
I would prefer we document both that and |
package managers have a feature to download and execute packages with the naming pattern
Will find the package The most famous example of this is |
And then for this part, I think we should use the pattern I have been working out here: pkgjs/create-pkg#7 |
@ctcpip see the |
Exactly, I also think the same way. We should use this pattern to provide a better DX, and I am also willing and passionate to contribute as a member. 😊 |
@wesleytodd I think we have to start working on gathering the requirements, or is it too early? |
Not too early at all! I think my personal focus is on the pressing work around v5, security, governance, and LTS strategy but that doesn't block anything. Just might mean I personally cannot help much yet. I think updating this issue to be that requirements and plan would be good. Or if this conversation is already too long you could do it as a new issue. |
I think gathering requirements is the stage we are in right now. The idea of having express itself expose a bin so we can do For context, express-generator gets less than 9k downloads weekly currently. Which is not zero, but effectively rounds to it when you consider express gets 29 million downloads per week. Meaning, I don't think the generator is holding back any users, or presenting them with issues we need to address with priority. It certainly doesn't seem to be harming adoption! I'd love to see a proposal of what problems a CLI would solve (I think there are many it could tackle!), and the actual implementation of it being an |
I personally am opposed to this at first glance. I will hold that weakly, but also I think the package we ship to prod servers should not include more than the requirements for runtime.
Yeah this is more of an indication of it's failure to be updated than it's usefulness in general imo. |
It is indeed trending downward, peaked at around 800k/year back in 2018 ish if these numbers are accurate: ![]() |
Obviously, Express itself is extremely popular--no one is going to argue with that, but aren't "downloads" of express/express here (i.e. from npm stats) counted every time anyone does an npm/npx update or install of any app with an Express dependency? OTOH, express-generator is a CLI build-time tool, so those are actual installations of the CLI (not run-time deps), which makes the two statistics not really comparable. I'm no npm expert, so perhaps I'm misunderstanding this? Anyway, I don't think we should get too hung up on the numbers of downloads. I just want to second what @wesleytodd said:
I think having a easy tool for new users is very valuable, even if intermediate to advanced devs don't use it and it doesn't cover many use cases. As long as it covers some basic use cases and patterns, it has value IMO. |
@crandmck Yup, I totally agree with you. It is a valuable tool for new users. Of course, we don't have to cover every use case, but we should include all the basic operations like creating a route, using middleware with CLI, etc. Although it may sound like no one uses these commands except for |
Hi team, I've created a repository to work on the design of the options that this new CLI could have (it won't have much logic for now). I'm taking inspiration from how Vite and Next.js work when creating a new application. I'll be finishing it in the next few days. Repo: https://github.com/bjohansebas/create-express |
Hi Maybe we should review this in future meetings, @kjugi has messaged me privately and is interested in helping, just like with the codemod repository. Btw, i haven't followed up much with the repository i mentioned above because i've been involved in other projects, but if there's consensus, i can focus on it and help launch this new CLI for Express. |
I added the tc-meeting label to discuss it and make a decision about the express-generator |
Bringing here another discussion I had opened: I have created this CLI inspired in NestJS' CLI: Github: I have just published a pre release version, but it can already be used in any project. No need to install it as dependency, just call It has commands to initialize a full boilerplate with husky, git, commitlint, swagger (pick what you want) or add an adapter, use case, repository, route, controller, service etc. in an existing project. It would be really nice to have some comments, suggestions, feedbacks on this. |
First of all, a huge appreciation to the Express team for coming together and reviving Express.
My suggestion is:
Express should release its CLI, which scaffolds the project boilerplate. While Express itself is a framework, the current setup process requires starting from scratch, leading to a less-than-ideal experience. Let's discuss the need for a cleaner, more robust, and modern version of the Express CLI, going beyond the capabilities of express-generator.
The text was updated successfully, but these errors were encountered: