1 | # comp
|
2 | **Currently tightly coupled to our stuff. Docs to be added.*
|
3 |
|
4 | comp helps build our site. comp renders react pages using data from our content api as a command line application.
|
5 | comp also exports a express middleware to develop sites locally, allowing production content to be proxied from a remote server.
|
6 |
|
7 |
|
8 | ## comp.generator()
|
9 | Interactively generates pages and templates in setup. Performs a diff from the last generation, and only displays changed pages.
|
10 |
|
11 | ## comp.server()
|
12 | Use as an express middleware.
|
13 |
|
14 | ```js
|
15 | import { proxy as compProxy } from '@ussu/comp';
|
16 |
|
17 | server.use(compProxy());
|
18 | ```
|
19 |
|
20 | Serves content from the remote, acting like proxy. Base template is rendered locally.
|
21 |
|