How to use TableView in a browser?

Quick example with Mux:

using Mux, DataFrames, TableView

function myapp(req; table)
  return showtable(table)
end

df1 = DataFrame(rand(10,5), :auto)

@app r = (
  Mux.defaults,
  page("/mytable", req -> myapp(req; table=df1)),
  Mux.notfound());

serve(r, 2429)

Then open your browser to http://localhost:2429/mytable

3 Likes