Make url Quickstart guide more user friendly
We need to update quickstart tutorial to make an app available on http://localhost:40000/ instead of http://localhost:40000/tasks, because some users may try to open the root of the server when they see such log message:
<INFO> [19:41:00] weblocks/server server.lisp (start-server) -
Starting webserver on WEBLOCKS/SERVER::INTERFACE: "localhost"
WEBLOCKS/SERVER::PORT: 40000 DEBUG: T
#<SERVER port=40000 running>
and right now they will see an empty page saying:
File "/" was not found.
Alternatively, we may fix not the documentation but Weblocks, by making it to handle / route as special and showing a list of all of the available apps if none of them is bound to the / route. This will also help users who are making their apps themselves, not by following a quickstart guide.
@vindarel what do you think about this?
I agree there is something to fix regarding /, it is disturbing to not find anything at this url.
The quickstart does link to http://localhost:40000/tasks, but it doesn't explain where the "tasks" part come from (the defapp name ? But why ?). We have to enhance the log message at the very minimum.
Documenting how routing works will also help. If you could do that a bit that would help me too. Is it as simple as defining a main-widget ? In Ultralisp:
(defwidget main-widget
("/"
(make-landing-widget))
("/login"
(make-login-processor))
("/logout"
(make-logout-processor))
("/github"
(make-repositories-widget))
("/versions/\\d+"
(make-version-widget))
("/projects/.*"
(make-project-widget))
(t
(page-not-found)))
Doing something by default at / would be good indeed.
(ps: I didn't contribute in a long time but I'm working towards it ! (at least I'm lisping !))
Great! I'll try to write documentation on routing until the end of February.
maybe fixed. A default widget now shows the available apps at /, PR https://github.com/40ants/reblocks/commit/415926a07ecd1c514b64de5cf7a5f3285263c634