Git Product home page Git Product logo

yolo's Introduction

yolo

A file watcher with web based user interface, so you can see the status of your build (and error output, if any) instantly.

Usage example:

$ yolo -i *.go -c 'go build' -a localhost:8080

It's silent by default. You can enable internal logging by;

$ LOG=* yolo ...

Install

$ go get github.com/azer/yolo

Todo

  • Check if a matching make command if -c isn't provided.
  • Read filenames from another file. So we could do yolo -f index.html and get live updates when dependencies change.
  • Escape characters
  • Output the name of changed file
  • Split JS to another endpoint so it can be included by other pages
  • How could it be used for viewing web pages / apps ?
  • How could output be processed ?

yolo's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

yolo's Issues

Websocket location.host

Hey

Thanks for making yolo, it's going to be super productive for my workflow - such great work!

To get yolo working for my use case, however, I've needed to adapt the javascript in yolo.go, line 95:

var conn = new WebSocket("ws://" + (addr[0] == ":" ? "localhost" + addr : addr) + "/socket");

// adapted to...

var conn = new WebSocket("ws://"  + location.host + "/socket");

Using 'location.host' works for me because I'm building the go code in a docker container where the internal hostname is 0.0.0.0:8080 but the port is mapped to another port (ie: http://localhost:6080)

So the original code was trying to make the websocket connect to ws://0.0.0.0:8080/socket and therefore it wasn't connecting because the page in the browser url is http://localhost:6080. If that makes sense. 'location.host' is just connecting back to the hostname in the browser so it works in a lot of use cases.

Best wishes

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.