Correct backend Readme.md

This commit is contained in:
Wolfgang Huß 2021-01-05 14:47:19 +01:00
parent cfafa7e0bb
commit 0af713f65f

View File

@ -26,27 +26,32 @@ some known problems with more recent node versions). You can use the
between different local node versions. between different local node versions.
Install node dependencies with [yarn](https://yarnpkg.com/en/): Install node dependencies with [yarn](https://yarnpkg.com/en/):
```bash ```bash
$ cd backend $ cd backend
$ yarn install $ yarn install
``` ```
Copy Environment Variables: Copy Environment Variables:
```bash ```bash
# in backend/ # in backend/
$ cp .env.template .env $ cp .env.template .env
``` ```
Configure the new file according to your needs and your local setup. Make sure Configure the new file according to your needs and your local setup. Make sure
a [local Neo4J](http://localhost:7474) instance is up and running. a [local Neo4J](http://localhost:7474) instance is up and running.
Start the backend for development with: Start the backend for development with:
```bash ```bash
$ yarn run dev $ yarn run dev
``` ```
or start the backend in production environment with: or start the backend in production environment with:
```bash ```bash
yarn run start $ yarn run start
``` ```
For e-mail delivery, please configure at least `SMTP_HOST` and `SMTP_PORT` in For e-mail delivery, please configure at least `SMTP_HOST` and `SMTP_PORT` in
@ -65,21 +70,23 @@ backend is running:
{% tabs %} {% tabs %}
{% tab title="Docker" %} {% tab title="Docker" %}
```bash
docker-compose exec backend yarn run db:migrate init
```
{% endtab %}
```bash
$ docker-compose exec backend yarn run db:migrate init
```
{% endtab %}
{% tab title="Without Docker" %} {% tab title="Without Docker" %}
```bash ```bash
# in folder backend/ # in folder backend/
# make sure your database is running on http://localhost:7474/browser/ # make sure your database is running on http://localhost:7474/browser/
yarn run db:migrate init yarn run db:migrate init
``` ```
{% endtab %} {% endtab %}
{% endtabs %} {% endtabs %}
#### Seed Database #### Seed Database
If you want your backend to return anything else than an empty response, you If you want your backend to return anything else than an empty response, you