privatenumber / tsx

⚡️ TypeScript Execute | The easiest way to run TypeScript in Node.js
https://tsx.is
MIT License
8.64k stars 132 forks source link

Environment variables support #511

Closed marcelldac closed 3 months ago

marcelldac commented 3 months ago

Acknowledgements

Feature request

What about environment variables support?

Like the node command:

node --env-file=.env index.js

We have something like this in tsx?

Motivations

Better environment variables hadling

Alternatives

No response

Additional context

No response

Contributions

privatenumber commented 3 months ago

Please see the README for how

marcelldac commented 3 months ago

Can you help me with this? I did not found.

privatenumber commented 3 months ago

I updated the README to explain this better instead as this Issue is an indication of poor documentation. Hopefully that helps.

marcelldac commented 2 months ago

tks

x-tropy commented 2 months ago
tsx --env-file=.env drizzle/seed.ts

What I got is:

/usr/local/bin/node: bad option: --env-file=.env

not sure why