astro-fastify

A Fastify adapter for Astro

Downloads
139
Stars
58
Committers
7

Bot releases are hidden (Show)

astro-fastify - 2.0.0 Latest Release

Published by matthewp almost 2 years ago

This release makes it so that you can define your Fastify entrypoint as a TypeScript file. Any file format supported by Vite can be used as an entry now.

astro-fastify - 1.6.0

Published by matthewp about 2 years ago

Logging

This now gives you full control over the Fastify logger via the logging options.

Note that these options must be serializable as they are built into the production bundle. By default the logger is set to true to enable basic logging.

import { defineConfig } from 'astro/config';
import fastify from '@matthewp/astro-fastify';

export default defineConfig({
  output: 'server',
  adapter: fastify({
    entry: new URL('./api/index.js', import.meta.url),

    logger: {
      level: 'info',
      file: '/path/to/file'
    }
  })
});