Giter Club home page Giter Club logo

Comments (6)

arejula27 avatar arejula27 commented on June 16, 2024 1

Yes, after adding

[proxy]
  enabled = true
  proxy_port = 3001
  app_port = 3000

This feature works

from air.

ndajr avatar ndajr commented on June 16, 2024

Hi @arejula27, is air reloading when the tmpl file content changes? Are you accessing the proxy port? Can you send here your air version and your config file?

from air.

AslanSN avatar AslanSN commented on June 16, 2024

I have the same issue, I always have to reload the browser page to see the changes, but as far as I know this is an expected behaviour(?)
Air version: 1.51.0 built with Go go1.22.2

from air.

ndajr avatar ndajr commented on June 16, 2024

Two things could be happening: 1. you're not accesing the proxy port on the browser, try to inspect the html page and confirm that you see a script <script>new EventSource... before the end of the body tag. 2. air is proxying an old dangling process running in the background. To check this, stop running air, and see if you can access the app port. If you can access the app, you need to kill it and run air again. lsof -i :8080 (assuming the app port is 8080) and kill PID. See if you can access the app port, at this point you shouldn't. Then run air again and see if that fixes the issue

from air.

arejula27 avatar arejula27 commented on June 16, 2024

Hi @arejula27, is air reloading when the tmpl file content changes? Are you accessing the proxy port? Can you send here your air version and your config file?

Probably my issue is that i am not accessing the proxy.

root = "."
testdata_dir = "testdata"
tmp_dir = "tmp"

[build]
  args_bin = []
  bin = "./main"
  cmd = "make build"
  delay = 1000
  exclude_dir = ["assets", "tmp", "vendor", "testdata"]
  exclude_file = []
  exclude_regex = ["_test.go", ".*_templ.go"]
  exclude_unchanged = false
  follow_symlink = false
  full_bin = ""
  include_dir = []
  include_ext = ["go", "tpl", "tmpl", "html", "templ"]
  include_file = []
  kill_delay = "0s"
  log = "build-errors.log"
  poll = false
  poll_interval = 0
  post_cmd = []
  pre_cmd = []
  rerun = false
  rerun_delay = 500
  send_interrupt = false
  stop_on_error = false

[color]
  app = ""
  build = "yellow"
  main = "magenta"
  runner = "green"
  watcher = "cyan"

[log]
  main_only = false
  time = false

[misc]
  clean_on_exit = false

[screen]
  clear_on_rebuild = false
  keep_scroll = true

Executing the version flag:

  __    _   ___
 / /\  | | | |_)
/_/--\ |_| |_| \_ v1.52.0, built with Go go1.22.3

from air.

ndajr avatar ndajr commented on June 16, 2024

@xiantang you can close the issue.

from air.

Related Issues (20)

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.