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

Followed default instructions (incl npm start) -> the server doesn't print error messages, but doesn't handle requests either #470

Open
marjakh opened this issue Sep 14, 2020 · 0 comments

Comments

@marjakh
Copy link
Contributor

marjakh commented Sep 14, 2020

To reproduce:

Take a clean checkout
npm run build
npm run watch

(In another terminal):
npm start

Output from npm start:

v8.dev$ npm start

> @ start /home/marja/code/v8.dev2/v8.dev
> superstatic --port=9001


Superstatic started.
Visit http://localhost:9001 to view your app.

But nothing is served on that port (when navigating with a non-incognito browser, it'll show a cached version).

$ wget http://localhost:9001
--2020-09-14 09:02:54--  http://localhost:9001/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:9001... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:9001... connected.
HTTP request sent, awaiting response... ^C

Workaround: npx serve dist

v8.dev$ npx serve dist
npx: installed 78 in 4.18s

   ┌────────────────────────────────────────────────────┐
   │                                                    │
   │   Serving!                                         │
   │                                                    │
   │   - Local:            http://localhost:5000        │
   │   - On Your Network:  http://192.168.178.24:5000   │
   │                                                    │
   │   Copied local address to clipboard!               │
   │                                                    │
   └────────────────────────────────────────────────────┘
$ wget http://localhost:5000
--2020-09-14 09:04:26--  http://localhost:5000/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:5000... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6267 (6.1K) [text/html]
Saving to: ‘index.html’

index.html          100%[===================>]   6.12K  --.-KB/s    in 0s      

2020-09-14 09:04:26 (341 MB/s) - ‘index.html’ saved [6267/6267]

If it's a problem with "the server fails to get the port" or something, it should at least print an error message!

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

1 participant