Skip to content

Instantly share code, notes, and snippets.

@GuGuss
Last active November 28, 2024 09:15
Show Gist options
  • Save GuGuss/225affcb0e111d2dcbd390a32746dce1 to your computer and use it in GitHub Desktop.
Save GuGuss/225affcb0e111d2dcbd390a32746dce1 to your computer and use it in GitHub Desktop.

Flawless collaboration between front and back developers

Prerequisites

Deploy the Symfony skeleton on Upsun

symfony new symfonycon-vienna-2024 --upsun
cd symfonycon-vienna-2024
symfony prokect:create --title symfonycon-vienna-2024
symfony deploy

Configure the Symfony app with the speakers list

Fill it with random data + 3 real users (Florent, Fab, GuGuss) Push to a GitHub repository.

Configure the DNS

sfcon-vienna-2024.deployfriday.com

Create the frontend branch

upsun environment:branch frontent

Demo

Explain the setup

Symfony backend

  • Show the production environment
    • Users entity
    • Single application
  • Show the frontend environment
    • Sanitization during deploy

Setup the Next.JS frontend

git checkout frontend
cd frontend
npx -y create-next-app@latest frontend
cd frontend 

Write the .upsun/config.yaml configuration

git add `.upsun/config.yaml`
git commit -m "Add the Next.JS application."
git push

Show the Next.JS application on the frontend environment.

Consume the backend

Configure Next.JS to fetch the GraphQL data.

git add *
git commit -m "Configure Next.JS to fetch the GraphQL data."
git push

Go live!

Click Merge on Upsun Console.

Show the podium.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment