Giter Club home page Giter Club logo

Comments (6)

jaschaephraim avatar jaschaephraim commented on July 26, 2024 1

@matthewmueller Great idea. I'll update in the next week or so.

from lrserver.

matthewmueller avatar matthewmueller commented on July 26, 2024 1

Haha fair enough! Funnily enough, I looked at this again last week and created a version that does implement it as middleware. It's heavily influenced by your work, so thanks for that!

I need to clean it up, but I'll post a link here once it's public to let others choose what works best for them.

from lrserver.

jaschaephraim avatar jaschaephraim commented on July 26, 2024 1

Awesome! Yes please keep me posted, I'll be sure to link to your project in the readme.

from lrserver.

jaschaephraim avatar jaschaephraim commented on July 26, 2024

Well I'm only a year late, but I had a chance to take another look at this and decided this feature would be beyond the scope of the project. I'll maintain this repo as a simple, solid, standalone server, but probably won't be adding any features in the future.

from lrserver.

ryanerwin avatar ryanerwin commented on July 26, 2024

@matthewmueller would be awesome if you've got a live reload implementation that you are ready to post long with the lrserver one!

from lrserver.

matthewmueller avatar matthewmueller commented on July 26, 2024

Haha, the thread that keeps getting forgotten and revived 😁

Here's the code: go-livereload-master.zip

It is working. It's just untested and undocumented. Example usage:

middleware := livereload.Watch("*.js")
router := some.Router()
handler := middleware(router)
http.ListenAndServe(":9000", handler)

Sorry for the bare minimum of effort. I didn't make progress since the last message and I probably won't for the foreseeable future. Maybe this is better than nothing? 🤷‍♂️

If anyone has the urge, I'd love for someone to clean it up and open source it. The license is MIT. Feel free to make it your own.

from lrserver.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.