Skip to content

Fastify server request handler for Remix

Notifications You must be signed in to change notification settings

dalitroz/remix-fastify

 
 

Repository files navigation

Remix Fastify

Use Remix with Fastify

Installation

npm i @mcansh/remix-fastify
yarn add @mcansh/remix-fastify
pnpm i @mcansh/remix-fastify

Quick Start

  1. npx create-remix@latest --template express
  2. install this
  3. remove compression, express, morgan, nodemon
  4. rename your server.js to server.ts with the following https://github.com/mcansh/remix-fastify/blob/main/example/server.ts - or change the imports to be require instead
  5. add server: "server.ts" to remix.config.js
  • note: on windows, you may need to manually call installGlobals() inside server.ts
    import fastify from "fastify";
    import * as serverBuild from "@remix-run/dev/server-build";
    import { remixFastifyPlugin } from "@mcansh/remix-fastify";
    import { installGlobals } from "@remix-run/node";
    installGlobals();
    
    // rest of your server code

Example

checkout the example usage in ./example/server.ts

About

Fastify server request handler for Remix

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 81.9%
  • JavaScript 16.7%
  • CSS 1.4%