Project Structure
An overview of the SherpaJS project structure.
Top-level Files
Top-level files are used to configure SherpaJS and manage the environment.
sherpa.server.ts | SherpaJS server config |
sherpa.module.ts | SherpaJS module config, optional only if creating a module |
.env | Environment Varibles File |
Routing Conventions
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 | Functions endpoint |
module | .ts .js | Module endpoint |
view | .html | View endpoint |
/folder_name | Regular route segment, any folder_name | |
/[param_name] | Dynamic route segment, any param_name |