mape / node-express-boilerplate

A boilerplate to quickly get projects going. It gives the developer a clean slate to start with while bundling enough useful features.
MIT License
846 stars 119 forks source link

Newbie: How to make it use ssl #6

Closed vinkaga closed 12 years ago

vinkaga commented 12 years ago

Can you point out how to make it use ssl? I am a newbie to Node/Express. Thanks in advance.

vinkaga commented 12 years ago

I can make the Express use ssl just fine but I am having trouble with socket.io connection when I use ssl. I tried modifying, in file jquery.client.js the following lines

var socketIoClient = io.connect(null, {
    'port': '#socketIoPort#'
    , 'rememberTransport': true
    , 'transports': ['websocket', 'xhr-multipart', 'xhr-polling', 'htmlfile', 'flashsocket']
});

to

var socketIoClient = io.connect(null, {
    'port': '#socketIoPort#'
    , 'secure':true
    , 'rememberTransport': true
    , 'transports': ['websocket', 'xhr-multipart', 'xhr-polling', 'htmlfile', 'flashsocket']
});

but that doesn't help (same as before). I would appreciate any pointers to make it work. Thanks in advance.

vinkaga commented 12 years ago

Found the way to do it. It needed key/cert params in lib/socket-io-server.js on line 3.