So I made Genie.jl app as it described in movie example. With controllers, route.jl, ets…
Is it possible to use Stipple.jl functionality in existed project?
I have no app.jl
in Genie.jl project… Where I should use all of these elements?
using GenieFramework # < inside controller?
using Statistics
@genietools # < inside controller?
@app begin # < inside controller?
@in N = 0
@out m = 0.0
@out name = "John"
@onchange N begin
m = mean(rand(N))
end
end
# Define the UI for each page
index() = [h1("Welcome {{name}}!"), a(href="/form")]
function formui() # < call this function from routes.jl
cell([
textfield("How many numbers?", :N),
p("The average of {{N}} random numbers is {{m}}"),
])
end
@route("/", index) # < remove this ?
@page("/form", formui) # < remove this ?
Can i just add?:
using MyGenieApp.OnesController
route("/trials", OnesController.formui)