fix: Make all network requests go through for Fresh server (#28)

This commit is contained in:
Tim Hårek Andreassen 2024-04-12 14:54:27 +02:00 committed by GitHub
parent 33dbdfefcc
commit 11413d6d94
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 7 deletions

5
dev.ts
View File

@ -1,5 +1,4 @@
#!/usr/bin/env -S deno run -A --watch=static/,routes/
import dev from "$fresh/dev.ts";
import config from "./fresh.config.ts";
await dev(import.meta.url, "./main.ts");
await dev(import.meta.url, "./main.ts", config);

7
fresh.config.ts Normal file
View File

@ -0,0 +1,7 @@
import { defineConfig } from "$fresh/server.ts";
import twindPlugin from "$fresh/plugins/twindv1.ts";
import twindConfig from "./twind.config.ts";
export default defineConfig({
plugins: [twindPlugin(twindConfig)],
});

View File

@ -1,7 +1,5 @@
import { start } from "$fresh/server.ts";
import manifest from "./fresh.gen.ts";
import config from "./fresh.config.ts";
import twindPlugin from "$fresh/plugins/twindv1.ts";
import twindConfig from "./twind.config.ts";
await start(manifest, { plugins: [twindPlugin(twindConfig)] });
await start(manifest, config);