4th Street Bar Hive-Bar

Hive-Bar Powered by Hive beta-fdb5b5b

Community post

Node.js: Self-signed HTTPS

Hello, reader of the post! I want to help you with your HTTPS on Node.js.
One day you will face with problem that you need use HTTPS instead of HTTP for server. I met this problem during embeding own widget to webpage.
If webpage has SSL certificate you will get an error. Your browser will say you something like "Hey buddy. Why do you use such cool and security SSL protocol for site, but you are trying connect with HTTP server. It is not seriously on my mind" :)
Of course it is the reason to change server protocol.
First of them you need to know that server SSL and site SSL are same things.
SSL certificate covers one domain and you can not extend it on subdomain (for example, "info.mysite,com" and "mysite.com" need others domains).
Выделение_645.png

This service will allow you to receive HTTPS certificate.
Then in Node.js you simply need to use built-in modules "https" and "fs".

Выделение_646.png

You need to include received files in production server and your application will receive HTTPS protocol.

Thank you for attention! Bye! :)

1 upvotes $0.00

Replies (0)

Conversation

No replies yet

Replies will appear here as people join the conversation.

Review before signing

Posting as . Signing with . Keychain permission: Posting. Hive Keychain will ask you to approve this action next.


  
Technical details

Operation fingerprint: