-
Notifications
You must be signed in to change notification settings - Fork 33
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
Hot-Reload for Development #4
Comments
how long will it take? |
@elevenbag Currently I'm working to wrap up Thank you for your interest. |
Cleaning up few comments that doesn't belongs to this thread. Anyway conversation took place in another thread. |
I look forward to your good news. |
I have evaluated fsnotify and watcher library for monitoring file and directory changes. I believe watcher library would be better fit for aah framework, I have created issue at watcher library radovskyb/watcher#20 to get few clarifications before I start integrating into aah framework. |
I have used |
@adelowo Yes I agree with you, I'm using it too. I will wait for response then we can take final choice. |
It's done, hooray! |
Goal is to provide
hot-reload
capabilities for development, so that it helps developer to have fun development.What is Hot-Reload?
To reflect changes made in Static Files (js, css), View template file and Go Source Code without manual intervention (i.e. manually stopping server and starting the aah server). Instead aah CLI will do monitoring/watch on aah project and does automatic stop, compile and start the aah server.
Design and Implementation
Approach and solution will be done in aah cli tool. It is not applicable for
prod
environment profile. It highly recommended to build and deploy the archive for production use.Static Files
aah framework delivers static file using standard library func
http.ServeContent
, which is by default adds theLast-Modified
response header and by default modern web browser does cache the static files locally.Solution is to prevent cache and deliver file always- (only for
dev
environment profile)Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Expires: 0
Go Source directory, view directory, config directory
Typically every go program gets compiled before the execution. The view template files compiled and stored in memory on server start.
Solution is to reflect code changes - (only for
dev
environment profile)* Standard Library Path is not applicable i.e.
GOROOT
Will try to bring this feature as early as possible.
The text was updated successfully, but these errors were encountered: