Fastify server request handler for Remix
MIT License
Bot releases are hidden (Show)
a7fcb6d: allows you to customize the cache control for both the files in the build directory as well as your public directory if you need to. using pretty-cache-header
under the hood so things like 1y
or 30 days
will work
await app.register(remixFastify, {
assetCacheControl: {},
defaultCacheControl: {},
});
a7fcb6d: fix cache control so that build assets are immutable and cached for 1 year instead of everything being cached for 1 hour
Published by mcansh 6 months ago
597df2e: re-introduce plugin for easy configuration, we're still publicly exporting all the pieces, so you can still continue to configure your server as you do today.
import { remixFastify } from "@mcansh/remix-fastify";
import { installGlobals } from "@remix-run/node";
import { fastify } from "fastify";
installGlobals();
let app = fastify();
await app.register(remixFastify);
let port = Number(process.env.PORT) || 3000;
let address = await app.listen({ port, host: "0.0.0.0" });
console.log(`✅ app ready: ${address}`);
and if you need to configure loadContext, you can do so like this:
import { remixFastify } from "@mcansh/remix-fastify";
import { installGlobals } from "@remix-run/node";
import { fastify } from "fastify";
installGlobals();
let app = fastify();
await app.register(remixFastify, {
getLoadContext(request, reply) {
return {};
},
});
let port = Number(process.env.PORT) || 3000;
let address = await app.listen({ port, host: "0.0.0.0" });
console.log(`✅ app ready: ${address}`);
90c6c61: changeset for #324
bump dependencies to the latest versions
Published by mcansh about 1 year ago
40e8daa: remove plugin in favor of having server code in server. this allows live reload funcationally of remix dev
to work
you can find an example of the updated server code in /example/server.js
Published by mcansh over 1 year ago
Published by mcansh over 1 year ago
Full Changelog: https://github.com/mcansh/remix-fastify/compare/@mcansh/[email protected]...@mcansh/[email protected]
Published by mcansh over 1 year ago
9fd5b94: feat: Stream results to clients
Instead of buffering the results and sending them down when they're all complete, instead we use a Passthrough stream to stream the chunks generated by Remix as we receive them.
Published by mcansh over 1 year ago
Published by mcansh over 1 year ago
Published by mcansh over 1 year ago
f3bdaa9: allow disabling purging of require cache
useful when using the future.unstable_dev
remix config flag
Published by mcansh almost 2 years ago
Full Changelog: https://github.com/mcansh/remix-fastify/compare/v2.0.1...2.1.0
Published by mcansh almost 2 years ago
Full Changelog: https://github.com/mcansh/remix-fastify/compare/1.12.0...v2.0.1
Published by mcansh almost 2 years ago
don't install this, it's 1.12.0
Published by mcansh about 2 years ago
assetsBuildDirectory
and publicPath
from ServerBuild
by @mcansh in https://github.com/mcansh/remix-fastify/pull/31
Full Changelog: https://github.com/mcansh/remix-fastify/compare/1.11.5...1.12.0
Published by mcansh about 2 years ago
feat: read assetsBuildDirectory and publicPath from ServerBuild
Published by mcansh about 2 years ago
Full Changelog: https://github.com/mcansh/remix-fastify/compare/1.11.4...1.11.5
Published by mcansh over 2 years ago
Full Changelog: https://github.com/mcansh/remix-fastify/compare/1.11.3...1.11.4
Published by mcansh over 2 years ago
Full Changelog: https://github.com/mcansh/remix-fastify/compare/1.11.2...1.11.3
Published by mcansh over 2 years ago
Full Changelog: https://github.com/mcansh/remix-fastify/compare/1.11.1...1.11.2
Published by mcansh over 2 years ago
Full Changelog: https://github.com/mcansh/remix-fastify/compare/1.11.0...1.11.1