#Multi tenancy with astro

3 messages · Page 1 of 1 (latest)

olive robin
#

Hi, I want to make an multi tenant app with astro that fetches data from a source and then makes multi tenant app out of it, I will be using the vercel domain api for routing for subdomains and need a feature where people can connect their own domain...

prisma salmonBOT
#

Hi @olive robin. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

I'm sorry, but the information extracts provided do not contain specific details on how to create a multi-tenant application with Astro or how to use the Vercel domain API for routing for subdomains. They also do not provide information on how to allow users to connect their own domain.

However, I can guide you on how to deploy your Astro application on Vercel and how to configure it for server-side rendering (SSR) using the Vercel adapter.

  1. Install the Vercel CLI and run vercel to deploy your Astro application. Vercel will automatically detect Astro and configure the right settings. When asked Want to override the settings? **y/N], choose N. Your application will then be deployed. [source** (https://docs.astro.build/en/guides/deploy/vercel)
npm install -g vercel
vercel
  1. To enable SSR in your Astro project, add the Vercel adapter using the astro add command. This will install the adapter and make the appropriate changes to your astro.config.mjs file. source (https://docs.astro.build/en/guides/integrations-guide/vercel)
npx astro add vercel
  1. If you prefer to install the adapter manually, you can do so by installing the @astrojs/vercel adapter and adding two new lines to your astro.config.mjs project configuration file. source (https://docs.astro.build/en/guides/deploy/vercel)
npm install @astrojs/vercel
import { defineConfig } from 'astro/config';
import vercel from '@astrojs/vercel/serverless';

export default defineConfig({
 output: 'server',
 adapter: vercel(),
});

For more detailed information and guidance, I recommend checking the full Astro documentation and Vercel documentation.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: