This repository is a centralized overview of all the backend's microservices and also should be the root directory of all the microservices in your development environment. We utilize git submodules which allows us to create a more containerized development flow.
If you open any of the submodule repositories from here it will send you to the repository with a detached head, in simple terms, you are viewing the repository from the context of some in commit that happened. This repository should act as a single source of truth and the afformentioned referenced commit should always be pointing to what is in production currently, for the purpose of clarity.
Since this repository utilizes git submodules, you must clone the repository recursively use the following command.
git clone --recurse-submodules -j8 [email protected]:KnightHacks/knighthacks_backend.git
The -j8
flag parallelizes the cloning to save time in the cloning process.
Following the previous command I suggest running the following command inside of the knighthacks_backend repository folder. It will checkout all submdules onto the main branch and pull down any recent changes.
bash checkoutall.sh main
Tip: If you are using ssh key passphrases and don't want to type in your passphrase an unbearable amount of times I suggest using ssh-agent
We require version 1.18+ in the development environment because of workspace support. Workspaces allow you to seemlessly utilize our module-based workspace without having to push the changes of a dependency ( like shared), and then make use the change on the dependent module. You can see live-changes to your dependencies from your dependents in your IDE when using go workspaces.
Whether you are on Linux, MacOS, Windows using WSL, or Git Bash (not recommended), we don't care. If you want to be able to run the bash scripts you must be on one of these platforms. This is not a must, however it will make your development flow a lot more seemless. No one wants to remember some long command that you use once in a blue moon.
Someone should write the shell scripts in windows batch
Follow the guide here