chore: READMEs for server and renderer packages

This commit is contained in:
SamTolmay 2021-02-19 13:28:06 +02:00
parent b06bce9c9b
commit 60e81c6373
5 changed files with 138 additions and 0 deletions

3
.gitignore vendored
View File

@ -19,3 +19,6 @@ packages/graphql/globalConfig.json
packages/graphql/node_modules/**
packages/server/dev/**
packages/cli/lowdefy.yaml
packages/servers/serverDev/lowdefy.yaml
packages/servers/serverDocker/lowdefy.yaml
packages/servers/serverNetlify/lowdefy.yaml

View File

@ -0,0 +1,33 @@
# @lowdefy/renderer
The Lowdefy renderer is the main part of the Lowdefy web client.
It has the following responsibilities:
- It contains the Graphql client
- It contains the the router
- It creates Lowdefy contexts, from `@lowdefy/engine`
- It controls component layout using `@lowdefy/layout`
- It loads blocks using [webpack module federation](https://webpack.js.org/concepts/module-federation/).
- It rerenders blocks when they should update.
A Lowdefy server serves a lightweight shell, that loads the renderer using module federation.
## Running a development server
- Run a Lowdefy development server using [`@lowdefy/server-dev`](https://github.com/lowdefy/lowdefy/tree/main/packages/servers/serverDev).
- Run the dev server using `yarn start`.
- The renderer will be hosted at port 3001, but the Lowdefy app will be served from port 3000 by the development server.
- If changes have been made in any dependencies (like `@lowdefy/engine`), they need to be built using `yarn build`, and the server restarted.
## More Lowdefy resources
- Getting started with Lowdefy - https://docs.lowdefy.com/tutorial-setup
- Lowdefy docs - https://docs.lowdefy.com
- Lowdefy website - https://lowdefy.com
- Community forum - https://github.com/lowdefy/lowdefy/discussions
- Bug reports and feature requests - https://github.com/lowdefy/lowdefy/issues
## Licence
[Apache-2.0](https://github.com/lowdefy/lowdefy/blob/main/LICENSE)

View File

@ -0,0 +1,28 @@
# @lowdefy/server-dev
A Lowdefy server for local development.
The server consists of a Lowdefy Graphql server, and a static file server to serve the web client shell. The web shell is a minimal react app, that loads a Lowdefy renderer using [webpack module federation](https://webpack.js.org/concepts/module-federation/).
> If you wish to develop a Lowdefy app, use the development server in the [CLI](https://docs.lowdefy.com/cli). The code for the CLI can be found [here](https://github.com/lowdefy/lowdefy/tree/main/packages/cli)
## Running a development server
- Create a `lowdefy.yaml` file in the root of the package directory, and build this configuration with the cli using `lowdefy build`.
- Build the dev server using `yarn build`.
- Run the dev server using `yarn start`.
- Run a [`@lowdefy/renderer`](https://github.com/lowdefy/lowdefy/tree/main/packages/renderer) server at port 3001 using `yarn start` or `yarn serve`.
To make changes to the server, you need to run `yarn build` in dependencies that have changed (like `@lowdefy/graphql`), and then run `yarn build`.
## More Lowdefy resources
- Getting started with Lowdefy - https://docs.lowdefy.com/tutorial-setup
- Lowdefy docs - https://docs.lowdefy.com
- Lowdefy website - https://lowdefy.com
- Community forum - https://github.com/lowdefy/lowdefy/discussions
- Bug reports and feature requests - https://github.com/lowdefy/lowdefy/issues
## Licence
[Apache-2.0](https://github.com/lowdefy/lowdefy/blob/main/LICENSE)

View File

@ -0,0 +1,15 @@
# @lowdefy/server-docker
A Lowdefy server that runs on [Docker](https://www.netlify.com).
## More Lowdefy resources
- Getting started with Lowdefy - https://docs.lowdefy.com/tutorial-setup
- Lowdefy docs - https://docs.lowdefy.com
- Lowdefy website - https://lowdefy.com
- Community forum - https://github.com/lowdefy/lowdefy/discussions
- Bug reports and feature requests - https://github.com/lowdefy/lowdefy/issues
## Licence
[Apache-2.0](https://github.com/lowdefy/lowdefy/blob/main/LICENSE)

View File

@ -0,0 +1,59 @@
# @lowdefy/server-netlify
A Lowdefy server that runs on [Netlify](https://www.netlify.com).
## Deploying to Netlify
#### Step 1
Your project will need to be hosted as a Github repository.
#### Step 2
Link your Github project to Netlify.
- Once logged in to Netlify, click the "New site from git" button.
- Choose Github, and authorise Netlify to access your repositories.
- Select your repository.
> If your repository isn't found, click "Configure Netlify on Github", and give Netlify access to your repository.
#### Step 3
Configure your Netlify deployment.
- Set your build command to `npx lowdefy@latest build-netlify`.
- Set your publish directory to `.lowdefy/publish`.
- Review the other settings, and deploy your site.
> Your site won't work yet. You first need to configure the Lowdefy backend server in the next step.
#### Step 4
Configure the Lowdefy backend server.
- Click the "Site settings" button.
- Choose the "Functions" section in the left menu.
- Edit the settings and set your functions directory to `.lowdefy/functions`.
#### Step 5
Redeploy your site.
- Go to the "Deploys" tab.
- Click the "Trigger deploy" button and deploy your site.
- Wait for you site to finish deploying.
On the "Site overview" tab you will find your site url.
## More Lowdefy resources
- Getting started with Lowdefy - https://docs.lowdefy.com/tutorial-setup
- Lowdefy docs - https://docs.lowdefy.com
- Lowdefy website - https://lowdefy.com
- Community forum - https://github.com/lowdefy/lowdefy/discussions
- Bug reports and feature requests - https://github.com/lowdefy/lowdefy/issues
## Licence
[Apache-2.0](https://github.com/lowdefy/lowdefy/blob/main/LICENSE)