how create lodash url page in deno/fresh?
1 Reply
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
:
routes/add.tsx
:
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.Helpful Links:
Basic Fresh site
Manipulating & Parsing URLs - Deno by Example
Create a route | Fresh docs
Building websites and apps with Deno
How to build a static site with Lume
HTTP Server: Routing - Deno by Example
Manipulating & Parsing URLs - Deno by Example
Import Maps
Deno Third Party Modules