Comments (13)
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.
Yes, I created a part folder with an index.html and tried to access, the same error occurred
from https-localhost.
I've tried to reproduce this error, without any success. I followed these steps.
- Uninstall https-localhost with
npm -g uninstall https-localhost
.which serve
shouldn't print anything. - Install https-localhost with
npm i -g --only=prod https-localhost
. mkdir test
andecho "<html><body>TEST</body></html>" > test/index.html
.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.
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.
from https-localhost.
Could you please try to clone the repository and perform npm test
?
from https-localhost.
Would it be this?
from https-localhost.
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.
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.
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.
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.
Thank you very much!
from https-localhost.
@leonardop21 any news?
from https-localhost.
Feel free to open it again if you have any further information. Thank you for your help.
from https-localhost.
Related Issues (20)
- Automated Certificate Management - Heroku HOT 1
- CORS Support
- Bug: Intermediate CA not added? Thanks for this module! HOT 2
- Unable to configure CORS HOT 2
- Running on Mac as a non-admin user HOT 3
- detected as the virus on windows HOT 1
- JAVA_HOME Set on Windows, Fails (access denied) HOT 2
- File exists: /usr/local/bin/serve HOT 5
- create a certificate for additional domains does not work HOT 4
- localhost didn’t send any data. HOT 4
- https server not working with socket.io HOT 2
- Request Aborted error from Android HOT 2
- How can I access localhost from mobile?
- Ability to set a custom domain in the cli
- Ability to add server headers HOT 4
- help with binary HOT 1
- Importing this library causes uncaught errors to be printed without stack traces HOT 4
- Mac M1 Chip Support HOT 1
- Error in the documentation
- localhost download file 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 https-localhost.