devlocker / tychus Goto Github PK
View Code? Open in Web Editor NEWCommand line utility to live-reload your application.
License: MIT License
Command line utility to live-reload your application.
License: MIT License
This seems like it would probably be a pretty big feature to add, but have you thought through web socket support? I'm kinda fuzzy on how I would even want it to work, but I might be willing to build it if there was a clear path forward
A clarification on my toots about this:
Right now, you have an include/exclude system to watch certain files but not others. That will probably always be useful for complex apps. But for simple apps (like the ones I maintain), it's only a burden. E.g., my scripts don't have extensions, so how do I specify that they should be watched? And even failing that, I just don't want to maintain a list of watched files; that's work.
I think it's strictly better to check disk state synchronously:
This has two huge benefits:
First, no load is generated unless a request comes in. With the current design, my CPU spikes every time I write a file, which causes a server reload. There's really no benefit to doing that, because you're always going to write some file immediately before a refreshing the browser anyway. Any server restarts before that final write are wasted, only serving to load the CPU and slow my other tools down.
Second, if the design is synchronous then many apps can just let tychus watch all files. There can never be a reload loop, even if the app writes logs or other files during startup or during requests. (Unless, I suppose, it makes a request to itself, which would be pretty weird.) It's true that disk writes done by the server will cause each new request to do a server reload, but there can never be a runaway reload loop. (I've already seen such a reload loop with the current design while I was testing it out.)
I didn't look closely enough to see how big a change this would be, but I suspect it's probably not that big. You obviously have the proxy in place, which is what I got hung up on when I gave this a try. (Nice work on that, by the way; I haven't noticed any problems with it!)
TL;DR I'm starting my app like this:
tychus go run cmd/server/*.go
Then I'm editing html files use in the web app's templates. Things like views/users/new.gohtml
.
When I make these changes they don't seem to cause a reboot of the app w/ Tychus. Not sure if this is supposed to be supported or not.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.