mirror of
https://github.com/kou029w/quot.git
synced 2025-01-19 16:38:06 +00:00
12 lines
270 B
TypeScript
12 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;
|