Skip to content

Commit

Permalink
Updated Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
SellersEvan committed May 10, 2024
1 parent 631df1e commit bf68c3a
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[
["Overview", "/"],
["Installation", "/installation"],
["Project Structure - WIP", "/structure"]
["Project Structure", "/structure"]
]
], [
"Building Your Application",
Expand Down
7 changes: 7 additions & 0 deletions docs/build/endpoints.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Endpoints

## Functions Endpoint

## View Endpoint

## Module Endpoint
6 changes: 5 additions & 1 deletion docs/build/routes.mdx
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# Routes
# Routes

## Regular Route

## Dynamic Route
23 changes: 13 additions & 10 deletions docs/structure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Top-level directories are used to organize endpoints and static files.
| | |
|---|---|
| [`routes`](/build/routes) | Endpoint routes |
| [`public`](/build/static-assets) | Static Assets |
| [`public`](/build/static-assets) | Static assets, *optional only if you want to server public assets* |


<br/>
Expand All @@ -25,21 +25,24 @@ Top-level directories are used to organize endpoints and static files.
Top-level files are used to configure SherpaJS and manage the environment.
| | |
|---|---|
| [`sherpa.server.ts`](/build/server-config) | SherpaJS Server Config |
| [`sherpa.module.ts`](/build/module-config) | SherpaJS Module Config |
| [`sherpa.server.ts`](/build/server-config) | SherpaJS server config |
| [`sherpa.module.ts`](/build/module-config) | SherpaJS module config, *optional only if creating a module* |



<br/>


## Routing Conventions
Naming conventions for routing inside the `routes` directory.
The naming conventions for inside the `routes` directory, allows you to define
routes usings segments and different types of endpoints. View and functions
endpoints may persist together, but no other files should be present in your
`routes` directory.

| | | |
|---|---|---|
| `index` | `.ts` `.js` | Endpoint functions |
| `module` | `.ts` `.js` | Endpoint module |
| `view` | `.html` | Endpoint view |
| `/folder_name` | | Regular route segment |
| `/[param_name]` | | Dynamic route segment |

| [`index`](/build/endpoints#functions-endpoint) | `.ts` `.js` | Functions endpoint |
| [`module`](/build/endpoints#module-endpoint) | `.ts` `.js` | Module endpoint |
| [`view`](/build/endpoints#endpoint-view) | `.html` | View endpoint |
| [`/folder_name`](/build/routes#regular-route) | | Regular route segment, *any folder_name* |
| [`/[param_name]`](/build/routes#dynamic-route) | | Dynamic route segment, *any param_name* |

0 comments on commit bf68c3a

Please sign in to comment.