# NodeJS Project This is a template project for NodeJS projects. ## Setup - Clone the repository: `git clone ` - Copy `example.env` to `.env` - Configure `.env` - You're done ## Start - Run `docker compose up -d` - Check if everything is working - You're done ## Run commands in container ### If the container is running ```sh docker compose exec nodejs ``` ### If the container is not running ```sh docker compose run --rm nodejs ``` ## Other commands ### Rebuild container ```sh docker compose build ``` ### Init git submodules (if any) ```sh git submodule update --init --recursive ``` ### Update git submodule ```sh # Enter the submodule directory cd # Pull the other repo git pull # Go back to the root directory of the project cd .. # Check update git status # Commit update git add git commit -m "Submodule updated" ``` ### Update git submodule (other method) ```sh git submodule update --remote --merge ``` ### Add git submodule ```sh git submodule add # or git submodule add ``` ### Remove git submodule ```sh git submodule deinit -f git rm -f rm -rf .git/modules/ ```