Lurker News

Comments (245) 47 threads

Earlier comments
sjroot2 replies#
Is 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.
sjroot#
I would propose adding support for a 'zeroignore' file to handle this. :)
asadlionpk2 replies#
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.
sjroot1 reply#
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.
asadlionpk3 replies#
You are right. A .zeroignore file seems like a good idea.

Continue this thread — 3 replies

jypepin#
seems like doing something like Next.js might be a better choice, aka have a main folder that exposes publicly accessible files, instead of having to add _ to each folders that should be private (it seems to me most folder/files would be private and not the other way around)
awb1 reply#
For markdown based sites, why not statically generate the site? Why render it on each request?
asadlionpk#
As markdown can be dynamic in this case. (see https://mdxjs.com). Static 'export' can be a good feature though.
giancarlostoro#
The time example reminds me of WSGI for Python. Neat that it supports templates too.
miki1232111 reply#
> 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?

chickenfries1 reply#
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.
ozten#
Another common on this page documents this bug on their production website.

Load more comments