Franz3
Franz3
Explore posts from servers
HHono
Created by Franz3 on 5/1/2024 in #help
Failed to load .env file ".env": Error: ENOENT: no such file or directory
Hey, Im new to using cloudflare and new to using Hono. I now came across an error that tells me Im missing a .env file, which also should contain some variables. The problem is, idk where I use these and what their values should be. It seems like these should be using system variables instead (Im currently on Windows 10), but I could find an answer online. This only started appearing after I added and tried using Hono. Here is my code:
import { Hono } from "hono";
import { testFeed } from "./createRssFeed";

const app = new Hono();

app.get("/", async content => {
content.header("Content-Type", "application/atom+xml");
content.header("Cache-Control", "no-cache");

const feed = testFeed();
return content.body(feed);
});
export default app;
import { Hono } from "hono";
import { testFeed } from "./createRssFeed";

const app = new Hono();

app.get("/", async content => {
content.header("Content-Type", "application/atom+xml");
content.header("Cache-Control", "no-cache");

const feed = testFeed();
return content.body(feed);
});
export default app;
The wrangler.toml file:
name = "qmj-atom-feed"
main = "src/index.ts"
compatibility_date = "2024-04-19"
compatibility_flags = ["nodejs_compat"]
name = "qmj-atom-feed"
main = "src/index.ts"
compatibility_date = "2024-04-19"
compatibility_flags = ["nodejs_compat"]
101 replies