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!
Solution:
they are yes
Jump to solution
23 Replies
Solution
Favna
Favnaโ€ข4w ago
they are yes
Shrewd ๐Ÿ’ซ
Shrewd ๐Ÿ’ซOPโ€ข4w ago
okie dokie thanks
Shrewd ๐Ÿ’ซ
Shrewd ๐Ÿ’ซOPโ€ข4w ago
@Favna shouldn't .env be in gitignore though the one that's located in src
Favna
Favnaโ€ข4w ago
GitHub
examples/.gitignore at feb072724c73a7b1fc07f38d80280ecfc73d08cc ยท s...
Various examples of setting up your bot with the Sapphire Framework - sapphiredev/examples
Shrewd ๐Ÿ’ซ
Shrewd ๐Ÿ’ซOPโ€ข4w ago
Okay since I am confused here; shall I leave .env as is and freely modify it or
Favna
Favnaโ€ข4w ago
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
Shrewd ๐Ÿ’ซ
Shrewd ๐Ÿ’ซOPโ€ข4w ago
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
Favna
Favnaโ€ข4w ago
anything *.local is gitignored
Shrewd ๐Ÿ’ซ
Shrewd ๐Ÿ’ซOPโ€ข4w ago
Am I supposed to create in main directory .env.local and just work from there?
Favna
Favnaโ€ข4w ago
.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 detail
Shrewd ๐Ÿ’ซ
Shrewd ๐Ÿ’ซOPโ€ข4w ago
is my sapphire cli generated template somehow affected if its set on development env or does it change nothing? assuming you already know
Favna
Favnaโ€ข4w ago
it isnt
Shrewd ๐Ÿ’ซ
Shrewd ๐Ÿ’ซOPโ€ข4w ago
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?
Favna
Favnaโ€ข4w ago
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.
Shrewd ๐Ÿ’ซ
Shrewd ๐Ÿ’ซOPโ€ข4w ago
yeah im just tired sorry
Favna
Favnaโ€ข4w ago
it is recommended to use the env specific files but if you want to exclusively use .env.local more power to you ๐Ÿคท
Shrewd ๐Ÿ’ซ
Shrewd ๐Ÿ’ซOPโ€ข4w ago
So yes, when I run the bot. Is something different here or its pretty much the same
Favna
Favnaโ€ข4w ago
this
Shrewd ๐Ÿ’ซ
Shrewd ๐Ÿ’ซOPโ€ข4w ago
okay guess I'll just run that damn bot and just see with my naked eyes before asking this question once again ๐Ÿ˜”
Favna
Favnaโ€ข4w ago
I can't stress enough how the readme describes exactly what files are loaded when
Shrewd ๐Ÿ’ซ
Shrewd ๐Ÿ’ซOPโ€ข4w ago
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
Shrewd ๐Ÿ’ซ
Shrewd ๐Ÿ’ซOPโ€ข4w ago
okay thanks

Did you find this page helpful?