R
R
Roman2019-06-05 10:32:46
Node.js
Roman, 2019-06-05 10:32:46

Tell me, do they do this at all if Express.js gives data to the Vue front in JSON via http directly on a different port?

Hello.
I continue to figure out how best to organize the interaction of the front on Nuxt and the back on one of the Node frameworks (Express, Koa, etc.)
So far, nothing is clear at all and I haven’t found any intelligible docks - they write about dev everywhere and nothing really about production: (
Is it possible to do this (on Ubuntu VPS):
1. Run pure Express on, say, port
9900. 2. Run Nuxt on port 80 (I still don’t understand if I need apache or nginx for the front)
3. Take data For the front using axios addressing port 9900.
Do they do that?
Or how they usually do?
Thanks.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anatoly Chernyshev, 2019-06-05
@procode

You can do this, but you need to take care of protecting port 9900 on the machine so that there is no free access to this port

R
Robur, 2019-06-05
@Robur

I don't know about nuxt, but somehow that's how ui/api usually do it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question