D
D
danilr2019-07-10 15:40:58
PHP
danilr, 2019-07-10 15:40:58

How to attach a BEC to a Vue project?

In the directory on the left, the dist folder is a folded frontend, how to attach a backend there? Placed dist folder on local OpenServer
5d25eb8d5e648192043718.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Skibin, 2019-07-10
@megafax

If you use all this for development, then:
0. Set up openServer to work under Nginx + apache or Nginx + php-fpm
1. Create your domain in openServer - create a folder
2. If backing to php - then you can place everything that is exactly there - it will be its dock root (I don’t know your environment, but it won’t be possible to do this on the prod
) (or at what address you have vue spinning) and for a path like ~* ^/api/ - went to apache or php-fpm.

R
Roman, 2019-07-10
@procode

The easiest way is to another port. Well, or to another subdomain/domain. And there to do the usual http-requests with axios.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question