项目作者: mbrsagor

项目描述 :
Blood donation App
高级语言: CSS
项目地址: git://github.com/mbrsagor/blood-donation.git
创建时间: 2021-01-22T13:24:28Z
项目社区:https://github.com/mbrsagor/blood-donation

开源协议:

下载


Product App

The project is basically fast api product app concept to develop microservice based backend web application.

The following steps will walk you thru installation on a Mac. Linux should be similar. It’s also possible to develop on
a Windows machine, but I have not documented the steps. If you’ve developed the apps on Windows, you should have little
problem getting up and running.

Setup:

  • python3.10
  • Fast API
  • Postgres
Instructions:

Setup: 1

  1. git clone https://github.com/mbrsagor/product.git
  2. cd product
  3. virtualenv venv --python=python3.10
  4. pip install -r requirements.txt

Setup: 2

Create database using PSQL command line

  1. sudo -u postgres psql
  1. CREATE DATABASE product;
  2. CREATE USER dev WITH PASSWORD '12345';
  3. ALTER ROLE dev SET client_encoding TO 'utf8';
  4. ALTER ROLE dev SET default_transaction_isolation TO 'read committed';
  5. ALTER ROLE dev SET timezone TO 'UTC';
  6. GRANT ALL PRIVILEGES ON DATABASE product TO dev;
  7. \q

Setup: 3

Migrate database:

  1. python create_db.py

Setup: 4

Run the product if everything is alright:

  1. uvicorn main:app --host 0.0.0.0 --port 8000