Closed mthomps4 closed 2 years ago
@kgajera
Instead of APP_ENV, would it be better to use NODE_ENV so we don't have to introduce a new variable?
I don't like using NODE_ENV, there are times in deployment environments where NODE_ENV is production, even though the environment may be Staging, Test, Demo, etc.
run:script
I don't think this should be prefixed with db:
while that may be 90% of the use case, they can be anything needed for the app. I'd rather move the scripts
folder if that helps.
You are right, we can run yarn ts-node {file}
, I wasn't sure if the semantic script would help encourage a pattern.
I too do not like using NODE_ENV as I have WAY too often seen it say production when I'm not actually in production, I think it is better to be explicit even if it is an extra environment variable. These can also help with things like sentry reporting where you can split out the "environments" with tags in the same project so it has more uses there.
I also like the pattern of run:script
because I often think people get caught up in not remember the ts-node or the "how" they can execute something, if we create the repeatable convenience it will be clear. I think this is looking great.
Changes
Checklist