this is impressive! I would absolutely reach for this first when scraping something together quickly. I'd be super interested in seeing numbers for just how far this can scale before falling over.
Currently this is as scalable as a normal node+express app. The aim for now is to improve development experience for now.
Show HN: Zero – A fast, zero-configuration server for React, Node.js, Markdown
41–50 of 256 posts
Re: Show HN: Zero – A fast, zero-configuration server for React, Node.js, Markdown
#42Earlier quoted context omitted.
Yes. It's not written in docs yet but any file or folder starting with _ (underscore) is not exposed publicly. This feature spec is still open for discussion as on how to tackle it the best.
Check my reply to this comment. The underscore idea was one of the first things to come to mind too, but I think having a specific file makes it clear to others who might not understand Zero internals.
Re: Show HN: Zero – A fast, zero-configuration server for React, Node.js, Markdown
#43Re: Show HN: Zero – A fast, zero-configuration server for React, Node.js, Markdown
#44> File-system Based Routing: If your code resides in ./api/login.js it's exposed at /api/login" rel="nofollow">http:// /api/login . Inspired by good ol' PHP days. > Auto Dependency Resolution: If a file does require('underscore'), it is automatically installed and resolved. You can always create your own package.json file to install a specific version of a package. This sounds like a security nightmare. EDIT: to be c…
Re: Show HN: Zero – A fast, zero-configuration server for React, Node.js, Markdown
#45Earlier quoted context omitted.
...why? I get that file-system based routing means you know the location of a source file on disk, but if anyone can access that file you've already lost. And auto-dependency resolution also doesn't seem any larger a security concern, all it's doing is skipping an "npm install" command.
Probably having .htaccess / .env / database configuration / files that are not supposed to be public be exposed. For instance, Rails has a public/ folder for files that are going to be served. And jekyll hides files by pattern-matching them[1]. Zero doesn't seem to have exclude folders by default. The solution would be to run Zero is a subfoler and require file in the parent folder which would act as the tree's root.…
Re: Show HN: Zero – A fast, zero-configuration server for React, Node.js, Markdown
#46Is there any way to "ignore" specific files or directories? For example, I want to reuse React components across different routes (exposed as jsx files). However, I don't want `mysite.com/components/Container` to be a valid endpoint.
Yes. It's not written in docs yet but any file or folder starting with _ (underscore) is not exposed publicly. This feature spec is still open for discussion as on how to tackle it the best.
Re: Show HN: Zero – A fast, zero-configuration server for React, Node.js, Markdown
#47For markdown based sites, why not statically generate the site? Why render it on each request?
Re: Show HN: Zero – A fast, zero-configuration server for React, Node.js, Markdown
#48Re: Show HN: Zero – A fast, zero-configuration server for React, Node.js, Markdown
#49As others have said before, I think this is amazing for small one offs and maybe for beginning programmers. I'm afraid that, like all frameworks, people will start to misuse it eventually. Someone will make a little app with that, because it's so fast, simple and amazing, right? Later, however, the app will grow and it will become a maintainability nightmare. The only good thing about it is that you can easily get ou…