Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 1, 2025

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 (typically http://localhost:3000/).

Solution

This PR adds a message that appears when navigating to the server's root route (/) during development mode.

image

This design is somewhat inspired by Laravel's own message for the same situation, but simpler

Laravel Screenshot image

@cloudflare-workers-and-pages
Copy link

Deploying wasp-docs-on-main with  Cloudflare Pages  Cloudflare Pages

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

View logs

Copilot AI changed the title [WIP] Show a message for people navigating to the server instead of web-app Add helpful message for users navigating to server root route in development Oct 1, 2025
Copilot AI requested a review from cprecioso October 1, 2025 15:51
Copilot finished work on behalf of cprecioso October 1, 2025 15:51
Comment on lines 21 to 25
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'
});
Copy link
Contributor

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?
Suggested change
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

@cprecioso

This comment was marked as outdated.

--page-background: #f0f0f0;
--wrapper-background: white;
--wasp-yellow: #f5cc05;
--main-link-color: #1a73e8;
Copy link
Member

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.

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

Successfully merging this pull request may close these issues.

Show a message for people navigating to the server instead of web-app

3 participants