Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add live-reload for go files #50

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TrevorEdris
Copy link

This is a minimization of the changes from #2. I've used this template for quite a few other projects and these changes are always the first update I make to the project, so I figured others may find them useful as well.

The main change here is the live-reloading of any changed .go files, triggering the auto rebuild and rerun of the web app running in docker compose. This is achieved via https://github.com/cosmtrek/air.

pagoda_local-dev-tools

restart: unless-stopped
ports:
- "8000:8000"
dev_cache:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need to redefine the cache and db here as opposed to letting the other compose file handle it and this would just be to optionally run the app via air?

follow_symlink = false
full_bin = ""
include_dir = []
include_ext = ["go", "tpl", "tmpl", "html", ".env"]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this include gohtml? That's what the templates currently use.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mikestefanello Atom and Sublime user? :D

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Goland for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants