Skip to content

limeiralucas/dbmonit

Repository files navigation

DBMonit

A simple rest api to store database write/read operations

makefile

We made a makefile to help you with you setup project. Check the file to see all commands availables.

create and active virtualenv

# virtualenv
$ virtualenv -p python3 env
$ source env/bin/activate
# pyenv
$ pyenv virtualenv 3.7.4 dbmonit
$ pyenv activate dbmonit

install requirements

$ cd dbmonit
$ pip install -r requirements-dev.txt

note: requirements-dev.txt has all requirements packages to test, coverage and lint. If you don't want this packages, just run pip install -r requirements.txt.

create and configure .env file

$ touch .env

add the env vars:

FLASK_APP=dbmonit.app
FLASK_ENV='development'
FLASK_DEBUG=1
SECRET_KEY="s3cr3t"
DATABASE_URL="mysql://localhost/dbmonit_db"

migrate

$ flask db init
$ psql -U postgres
psql (11.4)
Type "help" for help.

postgres=# create database dbmonit_db
$ flask db migrate
$ flask db upgrade

run

$  flask run
# secrets.toml
[default]
CSRF_SESSION_KEY = ""
JWT_SECRET_KEY = ""
TOKEN_SGP = ""
APP = ""

references

About

A simple rest api to store database write/read operations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published