Fix project setup by replacing the live-code reloading lib #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context and motivation
After the project was updated to use Go modules and Go 1.13, an error started to show up during the installation of the dependency
gin
during the execution of themake setup
task. This error was preventing the task from being executed, thus preventing us from building the project.What was done
This PR replaces the
gin
lib by Reflex, which handles the live-code reloading feature a little different. It works by reading the info present in thereflex.conf
file about what command should be run whenever a file is created or changed in the project's tree. In this case, reflex was configured to run the commandmake build && ./Will.IAM start-api
- which rebuilds and re-stars the app server - whenever a.go
file is changed or created inside the project's tree.Extra
You will notice that the files
go.mod
andgo.sum
changed. This was due to the execution of the commandgo mod tidy
to prune unused dependencies and addreflex
as an indirect dependency. This should not impact the system's functionality.Read more about the command here.