mioe
mioe5mo ago

how create lodash url page in deno/fresh?

hi, how create this pages: http://localhost:8000/_ - main http://localhost:8000/_/add - child
No description
1 Reply
Deno AI Helper
Deno AI Helper5mo ago
I wasn't able to find the answer to your question in the official Deno documentation. However, based on your message, if you're looking to create routes in a Deno Fresh project, you typically define your routes in the routes/ directory of your project. For example, to create the pages you're asking about, you would: 1. Create a file named index.tsx in the routes/ directory for your main page (http://localhost:8000/_). 2. Create a file named add.tsx in the routes/ directory for your child page (http://localhost:8000/_/add). The underscore (_) in URLs is not commonly used as a prefix for routes, so if you're trying to follow a specific naming convention or pattern, please ensure that it's supported by the routing mechanism in Fresh. Here's a basic example of what the content of these files might look like: routes/index.tsx:
/** @jsx h */
import { h } from "preact";

export default function Main() {
return <div>Main Page</div>;
}
/** @jsx h */
import { h } from "preact";

export default function Main() {
return <div>Main Page</div>;
}
routes/add.tsx:
/** @jsx h */
import { h } from "preact";

export default function Add() {
return <div>Add Page</div>;
}
/** @jsx h */
import { h } from "preact";

export default function Add() {
return <div>Add Page</div>;
}
Please note that this advice is not based on the Deno documentation, and I would advise you to double-check the accuracy of the advice given, and also to refer to the official Fresh documentation or examples for more detailed guidance on routing and page creation.