Hey there! 👋 This is my project template for Node.js projects. It is designed to provide a usable project skeleton with all of my linter rules, tooling, preferences etc. already in place, so I can spend more time building stuff, and less time setting it all up. It is provided in a fully documented state, with plenty of code comments, so that people who are unfamiliar with Node.js can see exactly what everything does.
- Initialise the project by cloning it into a new directory
- You may also want to purge this repositories
githistory before you start, you can do so withrm -rf .git
- You may also want to purge this repositories
- Copy
.env.exampleto.envand fill in the required variables - Run
npm installto install the dependencies - Run
npm devto start thetsccompiler andnodemonin watch mode
This project requires at least Node.js v18. Always use the latest LTS version of Node.js when you can!
Version management configuration for Node.js is provided for volta. I recommend you have this installed to automatically switch betIen Node.js versions when you enter one of our project directories. This allows for more deterministic and reproducible builds, which makes debugging easier.
You use volta to configure the project to use the latest LTS version of Node.js by running:
volta pin node@ltsYou can run this command again to update the version.
To install the dependencies:
npm installYou can then run the following to start the project in dev mode.
npm run devThis runs the build:watch and start:debug commands at the same time.
You can run the following to only start the server in debug mode. This will also watch your files for changes, and reload the server when your files are saved.
npm run start:debugYou can also run the following to only start the compiler in watch mode.
npm run build:watchYou can also build the library without watching the directory:
npm run buildThe tests for this library use Jest as the test runner. Once you've installed the dependencies, you can run the following command in the root of this repository to run the tests:
npm run testThis repo uses Semantic Versioning (often referred to as semver).
Thinking of contributing to this repo? Awesome! 🚀
Please follow the Contribution guide and follow the Code of Conduct.