7 ms·
For NodeJS I like to use a .env.local that can be copied to .env to provide all the configuration necessary for local development. I use a .nvmrc to pin the no
by benoau 1y ago
For NodeJS I like to use a .env.local that can be copied to .env to provide all the configuration necessary for local development. I use a .nvmrc to pin the nodejs version managed by nvm, and all package.json scripts use packages installed to that project not globally, and "scripts" run `nvm exec npx ...`. All of this means when I go into the directory it automatically use the right node, the right packages, the right secrets and configuration, and the next project can use an entirely different combination of versions and packages.
Infrastructure I put into a docker compose file, everything gets a non-default port to coexist, .env.local is preconfigured with relevant addresses.
Databases I use Sequelize migration and seeder scripts to create and populate.