question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Customize or disable serve console message

See original GitHub issue

What problem does this feature solve?

In non-SPA setups, the server may be operating on localhost:8080 and serving assets from there, but the site is being viewed on a separate domain my-php-site.test. In order for HMR to work correctly we enabled things like headers: { 'Access-Control-Allow-Origin': '*' } & set our baseUrl as

baseUrl: process.env.NODE_ENV === 'production'
  ? '/'
  : 'http://localhost:8080/',

This works great, except the dev will receive this message running serve:

App running at:
  - Local:   http://localhost:8080/http://localhost:8080/ 
  - Network: http://10.0.1.12:8080/http://localhost:8080/

What does the proposed API look like?

Potentially, if a serveMessage is provided, it will override any console messages.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

14reactions
csickycommented, Feb 11, 2019

The title of this issue is about how to change the console message. The discussion is about something else. I understand that it was an AB problem and the discussion solves the real problem, but for people arriving here from Google there is no information about how to change the console messages from npm run serve. I would like to be able to see only if there is a problem, if it’s green, yellow or red. I don’t want to give so much screen to the console, but in order to see what I want I have to see also the entire message which I know already:

 DONE  Compiled successfully in 24499ms      
  App running at:
  - Local:   http://localhost:8080/
  - Network: http://192.168.100.10:8080/

  Note that the development build is not optimized.
  To create a production build, run npm run build.

I need a way to have the console say only:

 DONE  Compiled successfully in 24499ms      
0reactions
phistepcommented, Mar 16, 2021

I’m building an app against an API, which I mock locally, but sometimes run tests from my local setup against the public (staging) API endpoint. I can configure the endpoint URL using variables in .env files. So I have one to run locally against the mock, one to run locally against the public staging API and one to run on the staging server against the public staging API etc. I would like to see in the output not only the local and network URL, but also which API URL is configured, so I won’t get confused which one I am targeting right now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Disable console messages? - High Performance Minecraft
Hi! Is there a way to disable console messages for example: [CONSOLE: Given Speed (Id1) * 5 to.... You know what I mean...
Read more >
Disable console messages in Flask server - Stack Overflow
Late answer but I found a way to suppress EACH AND EVERY CONSOLE MESSAGE ... Some more key words: flask test log remove...
Read more >
Disable rsyslog remote server 's console messages - Super User
My console is been flooded with rsyslog messages. These are messages that come from a remote server: Message from syslogd@MSAN-RSPAE_O1A0F ...
Read more >
Configuration Manager console notifications - Microsoft Learn
If you disable this setting, console users only see critical notifications. Configure a site to receive messages from Microsoft. Starting in ...
Read more >
How do I disable messages or logging from printing on the ...
I like working on the virtual terminals, but this is making it hard to deal with. :) Any ideas? log · console ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found