We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

use phalcon micro and nuxtjs togather

hey, any one have did a project with phalcon micro and nuxtjs. I want to create a SPA with phalcon and nuxtjs, but dont know how to config file togather both part back end and fronted work prefecly fine, but dont know how to merge them any suggestion be appreciate it



10.1k

Use phalcon micro to build an api, nuxt to display it.

Use phalcon micro to build an api, nuxt to display it.

that is the logic, but I dont know how to do it, I dont know how to force php phalcon api to show nuxtjs file



10.1k
Accepted
answer

The idea of nuxt is that it is a standalone server that renders out a vue project serverside. If you want attach server data you can do that with for example with an api. This is where Phalcon could be used. But it are 2 different systems that you connect to each other for example using http.

Just reverse proxy with nginx /api/ ->> Phalcon server /jsapp/ -> Vue/Node/Angular... whatever :)

Develop API as standalone service and test it as standalone service (with Postman)

edited Feb '19

Well, you only need to build front-end app (JS/whatever) and use it to target back-end (PhalconPHP). It's not that difficult to grasp what you need to do. Such systems usually talk over http protocol, even though it could be just TCP as well.

Or you don't know how to make nuxtjs part? Well, that's JS stuff etc, that's why I prefer having front-end devs doing that part, whilst I do the back-end and conception stuff :)

Use phalcon micro to build an api, nuxt to display it.

that is the logic, but I dont know how to do it, I dont know how to force php phalcon api to show nuxtjs file

thanks to every one for their answer, it means a lot and I used them, we discuss it and we decide to use a api.example.com for our back end with help of phalcon and put all vue file in example.com it work like a charm