astro/packages/integrations/node/src/index.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
423 B
TypeScript
Raw Normal View History

import type { AstroAdapter, AstroIntegration } from 'astro';
export function getAdapter(): AstroAdapter {
return {
name: '@astrojs/node',
serverEntrypoint: '@astrojs/node/server.js',
exports: ['handler'],
};
}
export default function createIntegration(): AstroIntegration {
return {
name: '@astrojs/node',
hooks: {
'astro:config:done': ({ setAdapter }) => {
setAdapter(getAdapter());
2022-03-24 11:27:15 +00:00
},
},
};
}