This is a template for Symfony project with Inertia and Vuejs that uses Vite instead of Webpack
Follow this instruction in creating new repo from this template https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template
- PHP 8
- Composer
- Symfony CLI
- Node
- NPM
Before you do the steps, make sure you are installed PHP8, Symfony, Composer, NodeJs and NPM.
- Install PHP Packages using Composer
composer install- Next install your node packages using npm
npm install- Run symfony server for backend
symfony server:start- Run node server for frontend dev env
npm run dev- Access http://localhost:8000 in your browser
You would see the modified vue version of symfony welcome
If you are familiar with Docker container, you can run the application using it.
- Change the
docker-compose.ymlif necessary like ports mapping to your host - Run docker compose
docker-compose up -d- Access http://localhost:8000 in your browser
As default it will map the port of the php to 8000 and inertia node to 13714
The pages directory is located in assets/
- pages will be the template that you can use to render in your controller
To change this configuration just change your .env files variables
The default for the url is the container of docker setup.
This ssr configuration is following the ssr support of Inertia https://inertiajs.com/server-side-rendering

