Comments (4)
After reloading the new bootstrap, I still had the same issue.
from genie.jl.
I'm not sure I completely understand the issue, but I've tried reproducing the hot-reload after an error problem and hot reloading works fine for me. What I've done:
- Start with this code and access the
/
path
using Genie
using Genie.Renderer.Html
route("/") do
"Welcome"
end
#= route("/error") do =#
#= html("Error?") =#
#= end =#
- Uncomment the second route and access
/error
. This throws ahtml
not defined error - Add
using Genie.Renderer.Html
to the top of the script and try/error
again. This time it works
Is this what you're trying to do?
from genie.jl.
There's another thing, which I'm not sure you're doing to trigger an error on purpose. The route
takes a function as first argument, not a rendered HTML string as the one returned y html()
. With the do...end
syntax we're passing an anonymous function to it. You can see the signatures here
julia> methods(route)
# 3 methods for generic function "route" from Genie.Router:
[1] route(action::Function, path::String; method, named, context)
@ ~/.julia/packages/Genie/Es7Db/src/Router.jl:236
[2] route(path::String, action::Function; method, named, context)
@ ~/.julia/packages/Genie/Es7Db/src/Router.jl:239
[3] route(r::Genie.Router.Route)
@ ~/.julia/packages/Genie/Es7Db/src/Router.jl:242
This is how you'd use it with a function parameter
using Genie
greet() = "Welcome to Genie!"
route("/greet", greet) # [GET] /greet => greet
up() # start the server
from genie.jl.
This is not happening with MVC framework that I can confirm.
from genie.jl.
Related Issues (20)
- integration with OpenAPI HOT 5
- Add "base_url" option, to "up()" to lop off referrer route path sent in from proxy servers (e.g. nginx)? HOT 7
- Loading Genie affects conversion of JSON3.Dict into Dict HOT 2
- Passing variables to `html` renderer yields key not found error HOT 4
- Genie.Logger.initialize_logging causes slow Arrow writes HOT 5
- Error reporting dumps sensitive information HOT 3
- Setting EARLYBIND "true" in Dockerfile causes port in use error HOT 3
- index-base transation missing. HOT 1
- Syntax error in first dashboard tutorial HOT 2
- [Bug] can't access own structure's properties in the reactive way HOT 11
- Typos in "your first dashboard" page in the website HOT 3
- Bug: Genie.Renderer.Html.html changes encoding when used with filepath HOT 2
- GC corrution in Genie[Session] HOT 1
- Applications compiled with Genie 5.23.x crashes (expected package `TimeZones [f269a46b]` to exist in the manifest) HOT 1
- Layout example does not work HOT 1
- Issues with the controller example from the docs HOT 4
- Multiple app modules no longer works HOT 6
- How to make the new Genie work behind nginx HOT 12
- Genie gives rise to a large number of GenieSession files via GenieSessionFileSession with enormous footprint >300GB HOT 26
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from genie.jl.