-
-
Couldn't load subscription status.
- Fork 1.4k
Add helpful message for users navigating to server root route in development #3213
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
base: main
Are you sure you want to change the base?
Conversation
Deploying wasp-docs-on-main with
|
| Latest commit: |
7a3e940
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6b491495.wasp-docs-on-main.pages.dev |
| Branch Preview URL: | https://copilot-fix-919b6a8a-4902-45.wasp-docs-on-main.pages.dev |
Co-authored-by: cprecioso <[email protected]>
| res.json({ | ||
| message: 'Wasp Server is up and running!', | ||
| note: 'This is the Wasp server API. If you are looking for the web app, it is running on a separate port (usually 3000).', | ||
| documentation: 'https://wasp-lang.dev/docs' | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some thoughts:
- It's JSON in dev, and an empty (I presume text) response in production - some people might make some assumption and try to parse it in production for their healthcheck? Maybe we stick with text here?
- We intentionally removed the body on this endpoint because people complained it's less professional - they might again assume the prod response will look the dev response - we might point out that this is a dev only message?
| res.json({ | |
| message: 'Wasp Server is up and running!', | |
| note: 'This is the Wasp server API. If you are looking for the web app, it is running on a separate port (usually 3000).', | |
| documentation: 'https://wasp-lang.dev/docs' | |
| }); | |
| res.json({ | |
| message: 'This is the Wasp server (development)', | |
| note: 'This is the Wasp server API. If you are looking for the web app, check the logs for Vite... You are seeing this message because the serve is running in develpoment mode, this will disappear when in production.', | |
| documentation: 'https://wasp-lang.dev/docs' | |
| }); |
I butchered it but I think you get the point I was trying to make
This comment was marked as outdated.
This comment was marked as outdated.
| --page-background: #f0f0f0; | ||
| --wrapper-background: white; | ||
| --wasp-yellow: #f5cc05; | ||
| --main-link-color: #1a73e8; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default blue is a bit too strong so I chose a lighter one.
Written by @cprecioso:
Problem
When developers navigate to the Wasp server's root route (e.g.,
http://localhost:3001/) during development, they receive an empty response with no indication of what's happening. This can be confusing, especially for new users who might expect to see their web application when they should actually be looking at a different port (typicallyhttp://localhost:3000/).Solution
This PR adds a message that appears when navigating to the server's root route (
/) during development mode.This design is somewhat inspired by Laravel's own message for the same situation, but simpler
Laravel Screenshot