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
cant run when start https server. #709
Comments
Ran into this issue yesterday when switching over to https. There are number of locations that require changes to make the jump but for this specific issue of runServer.js
_server.js_
to this:
start.js change this:
to this:
|
Also, in newer versions of browser-sync (>= 2.17.2 in my case) you can now utilize your own SSL certificate when browser-sync is proxying your application with the following configuration. Unfortunately their documentation is outdated and too short to cover all scenarios but by setting the
Reference:
Background: |
@gkmbinh thank you very much for crating this issue! Unfortunately, we have close it due to inactivity. Feel free to re-open it or join our Discord channel for discussion. NOTE: The |
var https = require('https');
var ssl = {
key: fs.readFileSync('./src/ssl/key.pem', 'utf8'),
cert: fs.readFileSync('./src/ssl/server.crt', 'utf8'),
passphrase: '1234567810'
};
var httpsSever = https.createServer(ssl,server);
httpsSever.listen(port, function () {
console.log(
The server is running at http://localhost:${port}/
);});
==>>> I got error
https://localhost:3001/main.js?134747cfdaa6f8908fb5 Failed to load resource: the server responded with a status of 404 (Not Found)
The text was updated successfully, but these errors were encountered: