fix typo developement to development

This commit is contained in:
RubenPX 2022-04-04 17:25:39 +02:00
parent 584f8b990a
commit 6b7cf88a2f
1 changed files with 54 additions and 54 deletions

View File

@ -1,54 +1,54 @@
# Setup developement project # Setup developement project
## Installing ## Installing
complete this steps from [README - Installing](README.md#installing) complete this steps from [README - Installing](README.md#installing)
## Setup project ## Setup project
Create a PostgreSQL database called devicehub by running [create-db](examples/create-db.sh): Create a PostgreSQL database called devicehub by running [create-db](examples/create-db.sh):
- Start postgresDB - Start postgresDB
- `bash examples/create-db.sh devicehub dhub, and password ereuse.` - `bash examples/create-db.sh devicehub dhub, and password ereuse.`
- `cp examples/env.example .env` - `cp examples/env.example .env`
Create a secretkey and add into `.env` Create a secretkey and add into `.env`
```bash ```bash
echo "SECRET_KEY=$(python3 -c 'import secrets; print(secrets.token_hex())')" >> .env echo "SECRET_KEY=$(python3 -c 'import secrets; print(secrets.token_hex())')" >> .env
``` ```
Using the dh tool for set up with one or multiple inventories. Create the tables in the database by executing: Using the dh tool for set up with one or multiple inventories. Create the tables in the database by executing:
```bash ```bash
export dhi=dbtest; dh inv add --common --name dbtest export dhi=dbtest; dh inv add --common --name dbtest
``` ```
Create a demo table Create a demo table
```bash ```bash
export dhi=dbtest; dh dummy export dhi=dbtest; dh dummy
``` ```
copy `examples/app.py` to project directory: copy `examples/app.py` to project directory:
```bash ```bash
copy examples/app.py . copy examples/app.py .
``` ```
## Run project ## Run project
Run the app Run the app
```bash ```bash
export FLASK_APP=app.py; export FLASK_ENV=development; flask run --debugger export FLASK_APP=app.py; export FLASK_ENV=development; flask run --debugger
``` ```
Finally login into `localhost:5000/login/` Finally login into `localhost:5000/login/`
- User: user@dhub.com - User: user@dhub.com
- Pass: 1234 - Pass: 1234
## Troubleshooting ## Troubleshooting
- If when execute dh command it thows an error, install this dependencies in your distro - If when execute dh command it thows an error, install this dependencies in your distro
- `sudo apt install python3-pip python3-cffi python3-brotli libpango-1.0-0 libpangoft2-1.0-0` - `sudo apt install python3-pip python3-cffi python3-brotli libpango-1.0-0 libpangoft2-1.0-0`