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.json
should be in the repository root. - Your
package.json
includes abuild
command used to build the codebase after the installation of npm packages. - Your
package.json
includes astart
command 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 use
On Windows use:
nvm use $($Get-Content .nvmrc)
- Linting probably won't work directly with command
npm run lint
do it via lint-staged with commandnpx lint-staged
. Don't 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