This repository has been archived on 2024-05-13. You can view files and clone it, but cannot push or open issues or pull requests.
share2fedi/astro.config.ts

30 lines
759 B
TypeScript
Raw Normal View History

2023-03-17 15:08:08 -05:00
import { defineConfig } from "astro/config";
2023-03-17 20:43:57 -05:00
import cloudflare from "@astrojs/cloudflare";
2023-03-17 15:08:08 -05:00
import netlify from "@astrojs/netlify/functions";
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 15:08:08 -05:00
console.debug("Using Vercel adapter");
astroAdapter = vercel();
} else if (process.env.NETLIFY) {
console.debug("Using Netlify adapter");
astroAdapter = netlify();
} else {
console.debug("Using Node.js adapter");
astroAdapter = node({
mode: "standalone",
});
}
export default defineConfig({
site: "https://s2f.kytta.dev",
adapter: astroAdapter,
output: "server",
});