mirror of
https://github.com/kou029w/quot.git
synced 2025-01-19 08:28:09 +00:00
11 lines
270 B
TypeScript
11 lines
270 B
TypeScript
import type { FastifyInstance } from "fastify";
|
|
import httpProxy from "@fastify/http-proxy";
|
|
|
|
async function api(fastify: FastifyInstance) {
|
|
await fastify.register(httpProxy, {
|
|
prefix: "/api",
|
|
upstream: fastify.config.apiUrl.href,
|
|
});
|
|
}
|
|
|
|
export default api;
|