Skip to content

Commit ad68ff5

Browse files
committed
docs: Update docs for web
1 parent d6ad134 commit ad68ff5

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

src/web/README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Web
22

3-
PartBot's Web module handles networks and routing, including a CDN and a filehost.
3+
PartBot's Web module handles networks and routing and stuff.
44

5-
The production deployment uses the NGINX configs defined in `@/web/configs`, which are build through the `build-configs`
6-
script. This may be safely ignored if you do not plan on using an NGINX configuration.
5+
The setup isn't very pretty, but broadly:
6+
7+
- `@/web/api` has all the API endpoints; endpoints export a `handler` function and an optional `verb`.
8+
- `@/web/ui` has all the frontend pages served under `SITE/`. Each file exports a `handler` that can either use `res.render` to render the given React code as static markup, or `res.getBundle` to load a bundle from `@/web/react/pages`.
9+
- `@/web/react/pages` is compiled to bundles that are injected into pages that use `getBundle`, while `@/web/react/compiled` has the Webpack-compiled files for the same. Abstracted code for React is in `@/web/react/components`.
10+
- `@/web/static` has static files served under `SITE/static`.
11+
12+
The loaders for all of these are in `@/web/loaders`, and use the file structure for nesting.

0 commit comments

Comments
 (0)