Comments (20)
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.
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:
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 npm init express.
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.
from discussions.
@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.
from discussions.
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 npm init express
.
from discussions.
what is this referring to?
package managers have a feature to download and execute packages with the naming pattern create-
. For example:
$ npm init express
Will find the package create-express
or @express/create
and will run the properly named bin script just like npx
would.
The most famous example of this is create-react-app
.
from discussions.
such as whether you want to set up a Git repository and which package manager you prefer to use, among other things etc.
And then for this part, I think we should use the pattern I have been working out here: pkgjs/create-pkg#7
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. 😊
from discussions.
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 npx express <something>
is interesting to me, but is a big departure from how things are now.
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 npm init
or npx express
pattern is a detail which is tangential to those problems we'd want to solve.
from discussions.
The idea of having express itself expose a bin so we can do npx express is interesting to me, but is a big departure from how things are now.
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.
For context, express-generator gets less than 9k downloads weekly currently.
Yeah this is more of an indication of it's failure to be updated than it's usefulness in general imo.
from discussions.
@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 npm express init
but I think it's a great value addition.
from discussions.
Hey! I agree. We have the generator package but it is quite old and doesn't follow the create-*
pattern which the package managers support either. I think it would be awesome change the name of that, but that likely might mean a full rewrite. Maybe the next best steps here are to list the requirements?
from discussions.
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?
from discussions.
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.
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.
from discussions.
@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.
from discussions.
@wesleytodd @jonchurch
Just to provide a brief overview of my thoughts: Instead of installing Express using npm i express
, it's recommended to use the Express CLI for scaffolding the project. The official way to do this is by executing the command npx express init my-app
. This command will initialize an Express app. Additionally, it will prompt you with a few questions before initializing the app, such as whether you want to set up a Git repository and which package manager you prefer to use, among other things etc.
This has to be the Offical way of express
from discussions.
follow the
create-*
pattern which the package managers support
what is this referring to?
from discussions.
The official way to do this is by executing the command npx express init my-app
I would prefer we document both that and npm init express
from discussions.
such as whether you want to set up a Git repository and which package manager you prefer to use, among other things etc.
And then for this part, I think we should use the pattern I have been working out here: pkgjs/create-pkg#7
from discussions.
@ctcpip see the npm init
docs: https://docs.npmjs.com/cli/v8/commands/npm-init
from discussions.
@wesleytodd I think we have to start working on gathering the requirements, or is it too early?
from discussions.
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.
from discussions.
It is indeed trending downward, peaked at around 800k/year back in 2018 ish if these numbers are accurate:
from discussions.
Related Issues (20)
- Module Format HOT 15
- Types? HOT 3
- How can I update the session with data from the database HOT 1
- Pilot LFX Insights On The Express Project HOT 15
- 2024-03-04 Express TC Meeting
- 2024-03-04 Express TC Meeting HOT 12
- 2024-03-04 Express TC Meeting
- How does the Express LTS strategy apply to modules not shipped directly with `express`? HOT 9
- EFI: Express documentation (expressjs.com website)
- Wayward Packages not under Express umbrella orgs HOT 5
- Workflow to auto close and lock PRs that match the `Update Readme.md` pattern HOT 2
- 2024-03-13 Express TC Meeting HOT 11
- 2024-03-18 Express TC Meeting HOT 7
- 2024-03-20 Express TC Meeting HOT 2
- 2024-03-20 Express TC Meeting HOT 1
- 2024-04-01 Express TC Meeting HOT 5
- Why are s: and hmac necessary in the express session cookie? HOT 2
- 2024-03-27 Express TC Meeting
- 2024-03-27 Express Working Session HOT 2
- 2024-03-27 Express TC Meeting
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from discussions.