Why would you want to do this?
Why wouldn't you want http on :80 and https on :443, so that you have
https://yourserver.com and http://yourserver.com instead of
http://blah.com and https://blah.com:80/ which looks funny and
strange?
Do something like this:
http.createServer(handler).listen(80);
https.createServer(keysAndStuff, handler).listen(443);
function handler(req, res) {
res.end('Hello, this is served to both http and https!\n');
}
On Wed, Feb 6, 2013 at 1:07 PM, Bradley Meck <[email protected]> wrote:
> A long time ago I built a proof of concept for something like this:
> https://github.com/bmeck/kitsune
>
> After thinking about maintainability I decided to avoid doing this sort of
> behavior but left the code up as an example.
>
> --
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.