Hacker News new | past | comments | ask | show | jobs | submit login

express (common web framework) seems to have only 51 deps in lockfile

jekyll has 13

I don't disagree that lots of deps = supply chain risk

But there have always been variations between projects & kinds of projects re how many deps they pull in. Try following someone's ipython data science tutorial, it's requirements.txt for days

I think lack of a standard lib early on plus hipster functional culture made the '10s JS leaders like small monofunctional libs.

Focus on transpilation plus lack of tree-shaking in early versions of webpack may have also created an incentive for small things.




A python equivalent to "express" would be Flask https://palletsprojects.com/p/flask/

I see 4 dependencies in the setup.py, and they are all from the same team of maintainers (i.e the Pallet team):

- Werkzeug

- Jinja2

- itsdangerous

- click

https://github.com/pallets/flask/blob/master/setup.py

https://github.com/pallets/flask/network/dependencies


The Python standard library is a lot more capable than the JS equivalents (Node or browser API). That eliminates the need for a lot of dependencies.

There's been a TC39 proposal for a JS stdlib for about 2 years now: https://github.com/tc39/proposal-javascript-standard-library


'pip freeze' results from a few other py web frameworks:

sanic = 18, fastapi = 3 but one of them is a 7MB download (pydantic)

yeah it's less, but also python has an amazing stdlib


To be fair, express is a production server itself whereas werkzeug is not, so you need to add something like gunicorn or uwsgi (yeah I know nginx supports uwsgi_pass natively). click is not necessary in production though (it's only used in the dev CLI).

That said, 4 dependencies is the norm in Python land, whereas 13 dependencies is an outlier in JS land.

Edit: oops, misread, gp said express has 51 deps, not 13.


Express is a micro web framework, it is very small and not really usable on it's own (and it's not meant to be).




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: