toot-script-condivisione-su.../astro.config.mjs

30 lines
771 B
JavaScript
Raw Normal View History

2023-03-17 21:08:08 +01:00
import { defineConfig } from "astro/config";
2023-03-18 02:43:57 +01:00
import cloudflare from "@astrojs/cloudflare";
2023-03-18 04:14:03 +01:00
import { netlifyFunctions } from "@astrojs/netlify";
2023-03-17 21:08:08 +01:00
import node from "@astrojs/node";
import vercel from "@astrojs/vercel/serverless";
let astroAdapter;
if (process.env.CF_PAGES) {
console.debug("Using Cloudflare adapter");
astroAdapter = cloudflare();
} else if (process.env.VERCEL) {
2023-03-17 21:08:08 +01:00
console.debug("Using Vercel adapter");
astroAdapter = vercel();
} else if (process.env.NETLIFY) {
console.debug("Using Netlify adapter");
2023-03-18 04:14:03 +01:00
astroAdapter = netlifyFunctions();
2023-03-17 21:08:08 +01:00
} else {
console.debug("Using Node.js adapter");
astroAdapter = node({
mode: "standalone",
});
}
export default defineConfig({
site: "https://s2f.kytta.dev",
adapter: astroAdapter,
output: "server",
});