A
A
Alexander Florenko2019-06-24 04:57:14
Node.js
Alexander Florenko, 2019-06-24 04:57:14

How to set up https with 2 nodejs servers?

Hello.
I have an application on vue + node.

For the front, there is a node server, since SSR.
Config here

The server for Api also works separately, also on node.
Config here

You need to configure https. Despite the fact that I am a front-end developer)

I found a couple of examples of how this is done.
but I can't figure out how to deal with 2 servers?

Actually, the front should be on port 80, and the back on 443?
How to set it up correctly?

Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lynn "Coffee Man", 2019-06-24
@SkipTyler

If you need https, then everything should be on port 443.
Usually this is done by another server (nginx, apache, something else) that listens on port 443, decrypts ssl and proxies requests for the necessary applications according to the url.
Plenty of examples on the net.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question