Comments (12)
Starting with [email protected]
you can pass the --no-clear
flag to prevent the clear()
call from happening.
No other variants will work and it's purposefully unlisted. These are both intentional :)
from sirv.
Hey there,
What is your current workaround, and how is this causing a problem?
The scroll history is preserved – it's just adjusting the viewport.
from sirv.
This problem is happening in development mode rather than production mode for me, where the server logs could possibly be useful, but I can live without them for now.
from sirv.
IMO this is a very surprising default, goes completely against expectation (I've never known anything else do this) what's the reason for it, just to clear those few 'header' lines? That's not worth it to me to also clearing everything else previously on screen, I find it very jarring.
from sirv.
Somewhat related: You can now hide only the logs (keeping the "application is running" text) via the --no-logs
flag starting with [email protected]
from sirv.
I can sort this out easily, just opening this issue to see if there's interest. Hope you can see the positive side of this suggestion!
from sirv.
@lukeed Since I'm using sirv with concurrently it's annoying that the output of all my other processes gets hidden every time sirv restarts. I have to keep scrolling which is just annoying and unnecessary. I could pass the output of sirv through sed I guess, to filter out the control code.
from sirv.
I forgot to mention last time: passing --quiet
will prevent the scroll clear. Is that sufficient for you?
Since you're restarting a server, presumably you don't need to see the start-up banner again & again. And if you have a process watcher anyway, you're already getting start/stop signals in your process-manager's logs.
My hesitation is that it feels very very silly to add a flag just to stop clearing; especially when this use case generally prefers hiding all other console noise too (aka, quiet).
from sirv.
I guess that's better, I don't really need the access logs. It might be nice to have a --no-header
for people that do but ah well.
from sirv.
Cool. I hear where you're coming from, but my recommendation for all production servers is to run with --quiet
– this is especially true in your case. There's significant performance advantages in doing so.
The documentation will start including this recommendation, too
from sirv.
I'm fine with using --quiet
in production, but the logs and the printed URLs are really helpful to have in dev, and as previously stated, clearing the screen ends up removing previous logs from other concurrent processes. Can we re-open this?
from sirv.
There are a number of things that do this, especially file servers. I much prefer this, in this case. And now it's easy to disable.
from sirv.
Related Issues (20)
- [Feature Request]: Serve One File HOT 1
- `Accept` header is not respected HOT 1
- Enable custom headers for sirv-cli HOT 2
- Please allow setting the network and the local address simultaneously HOT 4
- Default port conflicts with Airplay MacOS Monterey HOT 6
- Dynamic html files HOT 1
- Only handle GET requests that are not WebSocket requests
- sirv tests fail due to whitespace differences in terminal output on cli help test
- Sirv cuts the file if its size increases HOT 3
- Support for "." in pathnames
- Add Changelog HOT 2
- Document "dev mode"
- [feature] option to fail on port conflict HOT 1
- `/foo%2Fbar.txt` returns `/foo/bar.txt`
- Filter files more flexibly HOT 4
- Range request overlap is handled incorrectly HOT 2
- Option to enforce case sensitivity HOT 1
- Add some API to refresh / update the cache HOT 1
- Question: reduce cache size? HOT 2
- net::ERR_CONTENT_LENGTH_MISMATCH 200 (OK) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sirv.