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

HTTP and HTTPS same time #110

Open
hajoxx opened this issue Nov 5, 2014 · 0 comments
Open

HTTP and HTTPS same time #110

hajoxx opened this issue Nov 5, 2014 · 0 comments

Comments

@hajoxx
Copy link

hajoxx commented Nov 5, 2014

I'm successfully listenin port 443 and can access server over https, but I can't access it with http.

var fs = require('fs')
options = {
    ca : fs.readFileSync('./ssl/site.com.pem'),
    key: fs.readFileSync('./ssl/site.com.key'),
    cert: fs.readFileSync('./ssl/site_com.crt')
}

var app = require('express.io')
app.https(options).io()
....
app.listen(443);

I've tried using http and https modules:

app.http().io();
http.createServer(app).listen(80);
https.createServer(options, app).listen(443);

But this time socket.io is giving 404 in browser. How can I solve this? I need to use Express.IO's socket connection because application is based on it.

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