This demo demonstrates how to deploy a multi-framework app on a single domain using Vercel. It has:
- Main Site: Static HTML website
- /create: Nuxt3 app
- /blog: Ghost/Gatsby-powered blog (deployed on fly.io micro-VMs)
It also works on a custom domain
The repo utilizes Git submodules to manage these different parts of the project. This allows each section to exist in its separate repository while being deployed under a single, unified domain.
[submodule "website"]
url = https://github.com/danielunited/getplan-website.git
[submodule "app"]
url = https://github.com/danielunited/business-plan.git
[submodule "blog"]
url = https://github.com/danielunited/getplan-blog.git
For pulling the latest changes specifically for all the submodules, use:
git submodule update --recursive --remote
This will fetch and update the submodules to their latest commits in their respective remote repositories. Make sure you're in the root directory of your main repository when running this command.
nuxt.config.ts
sets the Nuxt app at [Domain]/create
.
export default defineNuxtConfig({ baseURL: '/create/' });
gatsby-config.js
makes the blog accessible at [Domain]/blog
.
module.exports = { pathPrefix: `/blog` };
These settings route traffic to the correct app sections.