This project have three services:
- nginx: load balancer
- php: docker wher we will have the server code
- node: dockeer where we will generate the assets for the app
You need to have doker in you computer to install it. To run the dockers execute:
# docker up with install
make du-i
This will make available a nuxt dev server in localhost:3000 to develop the frontend application, this is a hotreloading to make easy the development.
PHP will run in localhost:8080. The PHP docker will get the static nuxt HTML getting the static assets if they generated, to generate it execute:
make node-build
This script will generate the assets with the html and move them to the server folder.
The folder /server have the php code using slim4 for more information about this framework go to https://www.slimframework.com/docs/v4/. The code in the skeleton is to have a /api endpoint that the frontend will call.
The folder /node have the nuxt code. For more information about this framework go to https://nuxtjs.org/
In the php and node docker we have a folder to make the tests called "/tests". The test are prepared to be executed using:
make test
The php coverage will be available in http://localhost:8080/coverage/index.html