0

How can I deploy my astro page application into firebase hosting, is there any way to do it? I

'm using Astro page with Vue for client side, it's working great but in a deployment it's not even showing error straight up 404 error when i try to deploy it on firebase hosting and i try to call it through firebase functions and perform a SSR through Express api by integrating the dist into express api and refer it as a static , file everything got failed and i'm giving up on using astro, so please tell me the correct way to deploy my astro project into firebase hosting , or else any other hosting platforms are fine but i prefer firebase for my personal preference

This my Astro config for reference:

import { defineConfig } from 'astro/config';
import mdx from '@astrojs/mdx';
import sitemap from '@astrojs/sitemap';
import tailwind from '@astrojs/tailwind';
import vue from '@astrojs/vue';
import node from '@astrojs/node';

// Get environment-specific site URL
const SITE_URL = process.env.PUBLIC_SITE_URL || 'http://localhost:4321';

export default defineConfig({
  site: SITE_URL,
  integrations: [mdx(), sitemap(), tailwind(), vue()],
  output: 'server',
  adapter: node({
    mode: 'standalone'
  })
});

1 Answer 1

0

Yes, it's possible.

build your project

npm run build

install firebase cli

npm install -g firebase-tools

initialize firebase in your project

firebase init
  • Select “Hosting” as the feature to set up.

  • Choose an existing Firebase project or create a new one.

  • Set the `dist` directory as the public directory.

  • Specify `dist/index.html` as the default file if requested.

deploy your project

firebase deploy

Check the docs for detailed explanation: https://docs.astro.build/en/guides/deploy/google-firebase/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.