Live data from Hacker News

Show HN: Zero – A fast, zero-configuration server for React, Node.js, Markdown

zeroserver.io

71–80 of 256 posts

Re: Show HN: Zero – A fast, zero-configuration server for React, Node.js, Markdown

#71

Wow, I love that people can wrap express and many of its components and end with something so different from its foundation. That being said, this level of "batteries included" approach has a cost. In this example, it is the complexity of this file[1] and the fact that if you were to write this as a single express middleware you could probably write it in less than 20 lines. Guess this is just not my cup of tea? [1]…

Yes, writting an express backend is really simple, some plugins, error-handling etc. and you can run it in less than 1 hour.

But the Frontend with webpack needs definitely more time, hours and hours to fiddle webpack to your needs. This project has a definded strucutre and support defined modules (react), so it could save you a lot of webpack config time, but you can not do everything with it. You have to use it as it is.

Re: Show HN: Zero – A fast, zero-configuration server for React, Node.js, Markdown

#72
post #69

Maybe a silly question, but is there anything one needs to consider before deploying this to, let's say, Heroku?

As others have pointed out, make sure to mark files that are not supposed to be exposed to the client by prefixing them with a underscore, otherwise you'll have a bit of a security issue. Otherwise, you're good to go.

Ace! but in terms of running it, how would Heroku know how to, ie. if there's no `package.json`, there'll be no `npm run start` defined?

Re: Show HN: Zero – A fast, zero-configuration server for React, Node.js, Markdown

#73
post #65

Earlier quoted context omitted.

> If security is a concern At the risk of being presumptuous... When is security ever not a concern?

> When is security ever not a concern? Internal applications where the entirety of the userbase are trusted employees. (Preferably, the userbase is small, too.) Nobody’s going to bother finding vulnerabilities in an application where, if they break it, their own job gets harder.

I really hope you don't work for our infosec department!

Re: Show HN: Zero – A fast, zero-configuration server for React, Node.js, Markdown

#74

Earlier quoted context omitted.

Standing on the shoulders of giants :) You will eventually be adding all those packages when you develop a production-grade React / Node app anyway.

Perhaps this should be done gradually and thoughtfully, rather than pulling half the internet into each minimalist app out there.

Welcome to the world of node.

Re: Show HN: Zero – A fast, zero-configuration server for React, Node.js, Markdown

#75
post #26

> 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…

Putting my money where my mouth is - use this to leak any file accessible by the running user of zero from the filesystem:

    # curl -v --path-as-is 127.0.0.1:3000/../../../../../etc/passwd
    root:x:0:0:root:/root:/bin/bash
    [...]

Re: Show HN: Zero – A fast, zero-configuration server for React, Node.js, Markdown

#76

> Zero reads credentials from environment variables. Zero also loads variables from .env file in your project root, if it's present. Security nightmare? Can I do myapp.com/.env and read the credentials from the wider internet?

Why would you assume that they have this bug? If you’re actually curious if the bug exists go read the code or try it yourself.

Re: Show HN: Zero – A fast, zero-configuration server for React, Node.js, Markdown

#77
post #71

Wow, I love that people can wrap express and many of its components and end with something so different from its foundation. That being said, this level of "batteries included" approach has a cost. In this example, it is the complexity of this file[1] and the fact that if you were to write this as a single express middleware you could probably write it in less than 20 lines. Guess this is just not my cup of tea? [1]…

Yes, writting an express backend is really simple, some plugins, error-handling etc. and you can run it in less than 1 hour. But the Frontend with webpack needs definitely more time, hours and hours to fiddle webpack to your needs. This project has a definded strucutre and support defined modules (react), so it could save you a lot of webpack config time, but you can not do everything with it. You have to use it as i…

Lol, if the setup on the FE takes hours to fiddle something is wrong with the choice of tooling. I don't use webpack, so I guess I am just spoiled?

Re: Show HN: Zero – A fast, zero-configuration server for React, Node.js, Markdown

#78
post #74

Earlier quoted context omitted.

Perhaps this should be done gradually and thoughtfully, rather than pulling half the internet into each minimalist app out there.

Welcome to the world of node.

This is nothing to do with node. This is poor programmer decision making. You can build great node apps with a real minimalist approach. Holding up projects which pull in half of npm as "the world of node" is like holding up a hot and ready 5$ pizza and saying all Italian food is bad.

Re: Show HN: Zero – A fast, zero-configuration server for React, Node.js, Markdown

#80

Maybe a silly question, but is there anything one needs to consider before deploying this to, let's say, Heroku?

Oh, never spotted this: https://github.com/remoteinterview/zero#running-on-cloud

Oops.

Couldn't see it on the main docs site (https://zeroserver.io/)

Post reply on HN