Giter VIP home page Giter VIP logo

Comments (13)

daquinoaldo avatar daquinoaldo commented on June 14, 2024

I know that is a stupid question, but: there is an index file in that folder? If you try to append an existent file you got the same error? Like: https://localhost:4443/file.html

from https-localhost.

leonardop21 avatar leonardop21 commented on June 14, 2024

Yes, I created a part folder with an index.html and tried to access, the same error occurred

from https-localhost.

daquinoaldo avatar daquinoaldo commented on June 14, 2024

I've tried to reproduce this error, without any success. I followed these steps.

  1. Uninstall https-localhost with npm -g uninstall https-localhost. which serve shouldn't print anything.
  2. Install https-localhost with npm i -g --only=prod https-localhost.
  3. mkdir test and echo "<html><body>TEST</body></html>" > test/index.html.
  4. PORT=4443 serve test. You should see "TEST" on https://localhost:4443.

I'm using macOS Mojave latest version (10.14.4), Node.js v11.14.0 and npm v6.9.0.
Can you please provide your system data?

It seems not to be a problem related to the certificate, but something related to express.js or path resolving.

from https-localhost.

leonardop21 avatar leonardop21 commented on June 14, 2024

Hello,
Sorry for the delay, follow the tutorial above and I encountered the same problem. I tested with direct test and then passing the complete path of the directory where the file was, as print below. I will repeat the test at home with a windows pc.

Captura de Tela 2019-05-03 às 18 04 01
Captura de Tela 2019-05-03 às 18 04 12
Captura de Tela 2019-05-03 às 18 04 18

from https-localhost.

daquinoaldo avatar daquinoaldo commented on June 14, 2024

Could you please try to clone the repository and perform npm test?

from https-localhost.

leonardop21 avatar leonardop21 commented on June 14, 2024

Would it be this?

Captura de Tela 2019-05-06 às 14 17 53

from https-localhost.

daquinoaldo avatar daquinoaldo commented on June 14, 2024

No, this error is because you have not install the dev requirements, you can install them with npm install without the --only=prod option. Then you should be able to run tests.

from https-localhost.

leonardop21 avatar leonardop21 commented on June 14, 2024

It looks like all the tests have been completed successfully. Could it be some other program on my machine that is causing conflict?

Testing certs
✓ can be uninstalled
✓ uninstall is idempotent (doesn't fail if called twice)
Generating certificates...
Downloading the mkcert executable...
Running mkcert to generate certificates...
Certificates generated, installed and trusted. Ready to go!
✓ can be installed (19274ms)
Generating certificates...
Downloading the mkcert executable...
Running mkcert to generate certificates...
Certificates generated, installed and trusted. Ready to go!
Server running on port 4443.
✓ can be installed at first run (9300ms)
Cannot find localhost.key and localhost.crt in the specified path: does-not-exist
Server running on port 4443.
✓ crashes if certs doesn't exists in custom folder

Testing module
Server running on port 4443.
✓ works as express app
Server running on port 4443.
✓ works with environment port

Testing serve
Serving static path: test
Server running on port 4443.
✓ serves static files from custom path (55ms)
Serving static path: test
Server running on port 4443.
✓ serves static files from default env port
Serving static path: /Users/wwwjsw/Desktop/leonardo/test/https-localhost
Server running on port 4443.
✓ doesn't crash on 404 (256ms)
Serving static path: test
Server running on port 4443.
✓ looks for a 404.html file
Serving static path: does-not-exist
Server running on port 4443.
✓ doesn't crash if the static path doesn't exists

Testing additional features
http to https redirection active.
✓ redirect http to https
Serving static path: test
Server running on port 4443.
✓ is ready for production (1441ms)

14 passing (31s)

----------|----------|----------|----------|----------|-------------------|

File % Stmts % Branch % Funcs % Lines Uncovered Line #s
All files 100 100 100 100
certs.js 100 100 100 100
index.js 100 100 100 100
---------- ---------- ---------- ---------- ---------- -------------------

[email protected] posttest /Users/wwwjsw/Desktop/leonardo/test/https-localhost
node node_modules/nyc/bin/nyc.js report --reporter=html

from https-localhost.

daquinoaldo avatar daquinoaldo commented on June 14, 2024

Yes, them have been completed successfully. That is pretty strange, because there are tests with a file served on port 4443 and seem to work.
I do not exclude that could be a conflict with other programs. Any ideas?
Can you please try to run it with sudo permissions?
Have you tried it on Windows?
Thank you for your patience and your cooperation!

from https-localhost.

leonardop21 avatar leonardop21 commented on June 14, 2024

I do not know if I can test today, but during the week I'm going to do new tests here on mac and windows, and I bring new feedback

from https-localhost.

daquinoaldo avatar daquinoaldo commented on June 14, 2024

Thank you very much!

from https-localhost.

daquinoaldo avatar daquinoaldo commented on June 14, 2024

@leonardop21 any news?

from https-localhost.

daquinoaldo avatar daquinoaldo commented on June 14, 2024

Feel free to open it again if you have any further information. Thank you for your help.

from https-localhost.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.