sapphiredev/examples
so I've got a quick question. Are all examples, such as typescript-complete and the other one ready to be used in production use or is it better to start one from scratch? Haven't used it once but wanna get some grasp of how it is. It looks so helpful given the fact it is pretty annoying to be setting up manually everything once again and yeah. Thanks!
23 Replies
Solution
they are yes
okie dokie thanks
@Favna shouldn't .env be in gitignore though
the one that's located in src
https://github.com/sapphiredev/examples/blob/feb072724c73a7b1fc07f38d80280ecfc73d08cc/.gitignore#L26-L30
if you use @sapphire/cli to generate the code then this is inserted
GitHub
examples/.gitignore at feb072724c73a7b1fc07f38d80280ecfc73d08cc ยท s...
Various examples of setting up your bot with the Sapphire Framework - sapphiredev/examples
Okay since I am confused here; shall I leave .env as is and freely modify it or
the templates use https://github.com/skyra-project/archid-components/tree/main/packages/env-utilities#skyraenv-utilities so you can read in that readme how it works. The short version is that with this setup the
.env
becomes what other people use .env.example
for sometimes.GitHub
archid-components/packages/env-utilities at main ยท skyra-project/ar...
A collection of shared utilities for the ArchId Network - skyra-project/archid-components
So again, what difference would there be between .env.development and .env.local
Like, I am being totally frank here that I am just confused about it
anything
*.local
is gitignoredAm I supposed to create in main directory .env.local and just work from there?
.env.development
loads when NODE_ENV='development'
.env.production
loads whne NODE_ENV='production'
without .development
or .production
load either way
the local variants load at the same time, but are gitignored
the readme describes it in detailis my sapphire cli generated template somehow affected if its set on development env or does it change nothing? assuming you already know
it isnt
so technically it doesn't change anything and I can use .env as usual given the fact my credentials are the same.
is it safe to assume that?
that's not what you asked. You asked if the generated files by the cli are affected by what your env is, that is a no. However that is unrelated to when you then run the bot, that's a completely different process.
yeah im just tired sorry
it is recommended to use the env specific files but if you want to exclusively use
.env.local
more power to you ๐คทSo yes, when I run the bot. Is something different here or its pretty much the same
this
okay guess I'll just run that damn bot and just see with my naked eyes before asking this question once again ๐
I can't stress enough how the readme describes exactly what files are loaded when
Yeah well this isn't really a big difference for me but rather if this template is set up so development equals detailed logging and production less logging something of that sort. please tell me you comprehend
it is not: https://github.com/sapphiredev/examples/blob/feb072724c73a7b1fc07f38d80280ecfc73d08cc/examples/with-typescript-complete/src/index.ts#L10-L12
but that's just a simple if check to add there
okay thanks