From ce5d6d4d34507834b2d8e8a2b7bbca6d3563253e Mon Sep 17 00:00:00 2001 From: nionata Date: Thu, 21 May 2020 12:52:20 -0400 Subject: [PATCH] updated documentation --- README.md | 4 ++-- client/README.md | 2 +- cms/README.md | 35 +++++++++++++++++++++++++++++++++-- 3 files changed, 36 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index dbc9cc3c..6ff39998 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ ### `/` -- #### `client/` - [Client](/client#client) is the frontend of the application. It is powered by [React](https://reactjs.org/) and [Blockly](https://developers.google.com/blockly). +#### `client/` +[Client](/client#client) is the frontend of the application. It is powered by [React](https://reactjs.org/) and [Blockly](https://developers.google.com/blockly). #### `cms/` diff --git a/client/README.md b/client/README.md index 7ebcaf2b..3f1a54df 100644 --- a/client/README.md +++ b/client/README.md @@ -1,6 +1,6 @@ # Client -[React.js](https://reactjs.org/) application which represents the entire browserside client. File structure is standard for a [create-react-app](https://github.com/facebook/create-react-app) application with some minor changes. Any component which represents an entire page is categorized under the [views](/client/src/views) folder. +> [React.js](https://reactjs.org/) application which represents the entire browser-side client. File structure is standard for a [create-react-app](https://github.com/facebook/create-react-app) application with some minor changes. Any component which represents an entire page is categorized under the [views](/client/src/views) folder.
diff --git a/cms/README.md b/cms/README.md index 986a1a34..800bf2d5 100644 --- a/cms/README.md +++ b/cms/README.md @@ -11,7 +11,7 @@ REST API and admin portal that comprise the backend. It is powered by [Node](htt ### Development 1. Install [docker](https://docs.docker.com/get-docker/) -3. Start a new docker container running postgres `yarn run make-db` +3. Start a new docker container running postgres `yarn run db-make` 4. Install dependencies `yarn install` 5. Start the development server `yarn develop` @@ -19,6 +19,36 @@ Additional scripts: * Start an existing db container `yarn db-start` * Connect to the postgres bash `yarn db-bash` +* Build and add the client `yarn build-frontend` + +
+ +## Static Assets + +All assets in the **public** directory will be served. The specifics are defined [here](https://strapi.io/documentation/3.0.0-beta.x/concepts/public-assets.html). + +### Frontend + +The frontend (**public/frontend**) is served this way with a slight twist. Due to the way public assets are natively served in Strapi, a frontend middleware handles serving **frontend/index.html**. The other frontend assets are served natively. If the middleware was not implemented, pasting a non-root frontend path would lead to a 404. Read more about this [here](https://github.com/STEM-C/STEM-C/pull/28#pullrequestreview-415846251). + +> As routes are added to react router, they will need to be added to the config + +```json +// middlewares/frontend/defaults.json + +{ + "frontend": { + ... + "routes": [ + "/", + "/login", + "/register", + "/teacher*", + "/workspace*" + ] + } +} +```
@@ -67,4 +97,5 @@ Read the full [documentation](https://strapi.io/documentation/3.0.0-beta.x/conte Built with [React](https://reactjs.org/) and served by [Node](https://nodejs.org/en/), the admin panel allows for full customization of the server. Here you can create new content types and their corresponding endpoints, configure roles and permissions, and much more. The interface itself can be customized and configured as needed. -Read the full [documentation](https://strapi.io/documentation/3.0.0-beta.x/admin-panel/customization.html) on the admin panel. \ No newline at end of file +Read the full [documentation](https://strapi.io/documentation/3.0.0-beta.x/admin-panel/customization.html) on the admin panel. +