README and bbconf updates
This commit is contained in:
parent
14761fa3e5
commit
66bb390568
64
README.md
64
README.md
@ -13,10 +13,16 @@ Let's assume you create a `basebox` folder in your home directory, change into i
|
||||
cd ~
|
||||
mkdir basebox
|
||||
cd basebox
|
||||
tar xzf basebox-version-arch.tgz # adopt this command to the basebox distribution archive you downloaded
|
||||
tar xzf basebox-version.tgz # adopt this command to the archive you downloaded
|
||||
git clone --single-branch --depth 1 https://gitea.basebox.health/samples/vue-todo.git
|
||||
```
|
||||
|
||||
The basebox archive will be extracted into a directory named `basebox-<version>`; for the scripts in `vue-todo/bbconf` to find the basebox binaries, please create a symbolic link to the basebox directory named `basebox`, e.g.
|
||||
|
||||
``` sh
|
||||
ln -s basebox-0.1.1-beta.1 basebox
|
||||
```
|
||||
|
||||
If you follow these steps, the scripts in `bbconf` will work out of the box.
|
||||
|
||||
## Installation
|
||||
@ -45,6 +51,8 @@ createuser -DRP bb_todo # default password: basebox
|
||||
createdb -O bb_todo bb_todo
|
||||
```
|
||||
|
||||
If you use a different password than `basebox`, you also have to change `bbconf/dbproxy-config.toml` accordingly.
|
||||
|
||||
Tell PostgreSQL that the `bb_todo` user connects to the database using md5 authentication. To do so, edit `/etc/postgresql/<PostgreSQL version>/main/pg_hba.conf` (on Debian based Linux systems) to contain the following:
|
||||
|
||||
```conf
|
||||
@ -77,4 +85,58 @@ If you're curious, you can recompile the GraphQL schema like so:
|
||||
bin/bbconf --prefix=bb_todo -f todo_schema.graphql -o bbconf
|
||||
```
|
||||
|
||||
### Client Installation
|
||||
|
||||
After installing [node.js](https://nodejs.org/en/download) and [npm](https://www.npmjs.com/package/npm), open a terminal window, go to the root of the vue-todo repository and enter the following commands:
|
||||
|
||||
``` sh
|
||||
cd vue-todo
|
||||
npm i
|
||||
```
|
||||
|
||||
This will install the client app's dependencies.
|
||||
|
||||
### OpenID Connect
|
||||
|
||||
You can setup and or use your own OpenID Connect server; if you do so, you also have to update the config files `bbconf/broker-config.toml` and `bbconf/dbroxy-config.toml` accordingly.
|
||||
|
||||
If you just want to try things out, you are welcome to use our development Keycloak server. The config files are already setup to use it. There is a test user named `tester`, the password is `rantanplan`.
|
||||
|
||||
We have an extra page in our documentation dedicated to [Authorization](https://docs.basebox.io/guide/authorization/).
|
||||
|
||||
## Run
|
||||
|
||||
### Start dbproxy
|
||||
|
||||
Open a new terminal window, then:
|
||||
|
||||
``` sh
|
||||
cd ~/basebox/vue-todo/bbconf
|
||||
./dbproxy.sh
|
||||
```
|
||||
|
||||
This command starts dbproxy; you will see a lot of log messages being written to the console.
|
||||
|
||||
### Start broker
|
||||
|
||||
Open another terminal window, then:
|
||||
|
||||
``` sh
|
||||
cd ~/basebox/vue-todo/bbconf
|
||||
./broker.sh
|
||||
```
|
||||
|
||||
Again, you see broker's log messages on the console. Each request to the broker will be shown, similar to an Apache or nginx access log.
|
||||
|
||||
### Start the Client
|
||||
|
||||
In another terminal window:
|
||||
|
||||
``` sh
|
||||
cd ~/basebox/vue-todo
|
||||
npm run dev
|
||||
```
|
||||
|
||||
This will start a node.js based HTTP test server that will host the client application. It will print the URL where you can load it to the console.
|
||||
|
||||
Open your browser, go go the URL in the npm console, and enjoy.
|
||||
|
@ -1,3 +1,3 @@
|
||||
#!/bin/sh
|
||||
# Run basebox broker from the samples/toodo/bbconf directory
|
||||
../../bin/broker -c broker-config.toml
|
||||
../../basebox/bin/broker -c broker-config.toml
|
||||
|
@ -2,4 +2,4 @@
|
||||
#
|
||||
# Compile the todo schema.
|
||||
#
|
||||
../../bin/bbc --prefix=bb_todo -f todo_schema.graphql
|
||||
../../baseboxbin/bbc --prefix=bb_todo -f todo_schema.graphql
|
||||
|
@ -1,3 +1,3 @@
|
||||
#!/bin/sh
|
||||
# Run basebox dbproxy from the samples/toodo/bbconf directory
|
||||
../../bin/dbproxy -c dbproxy-config.toml
|
||||
../../basebox/bin/dbproxy -c dbproxy-config.toml
|
||||
|
Loading…
Reference in New Issue
Block a user