This is a basic repository template for deploying a node.js application with the Silta frontend chart.
The express application in index.js is just there as an example, feel free to replace it. The only requirements are:
- Your project's
package.jsonshould be in the repository root. - Your
package.jsonincludes abuildcommand used to build the codebase after the installation of npm packages. - Your
package.jsonincludes astartcommand used to start your application in the deployed environment.
It is recommended to use NVM in order to switch on correct Node.js and npm versions with ease.
On Linux and MacOS use:
nvm useOn Windows use:
nvm use $($Get-Content .nvmrc)- Linting probably wont work directly with command
npm run lintdo it via lint-staged with commandnpx lint-staged. Dont worry per-commit hooks will work fine. - In your code editor use LF all the time, otherwise there will be prettier errors when linting.
- If having LF in your editor is not enough, try this command "git config --global core.autocrlf false".More info here https://stackoverflow.com/questions/25724969/sourcetree-line-ending-issue