Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make url Quickstart guide more user friendly #14

Open
svetlyak40wt opened this issue Feb 16, 2019 · 4 comments
Open

Make url Quickstart guide more user friendly #14

svetlyak40wt opened this issue Feb 16, 2019 · 4 comments

Comments

@svetlyak40wt
Copy link
Member

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.

@svetlyak40wt
Copy link
Member Author

@vindarel what do you think about this?

@svetlyak40wt svetlyak40wt changed the title Update quickstart tutorial to make app available on http://localhost:40000/ instead of http://localhost:40000/tasks Make url Quickstart guide more user friendly Feb 16, 2019
@vindarel
Copy link
Contributor

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 !))

@svetlyak40wt
Copy link
Member Author

Great! I'll try to write documentation on routing until the end of February.

@vindarel vindarel self-assigned this Feb 10, 2020
@svetlyak40wt svetlyak40wt transferred this issue from 40ants/weblocks Jan 5, 2022
@vindarel
Copy link
Contributor

vindarel commented Jan 5, 2022

maybe fixed. A default widget now shows the available apps at /, PR 415926a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants