An open API service indexing awesome lists of open source software.

https://github.com/yud0uhu/road-map-server


https://github.com/yud0uhu/road-map-server

fastapi heroku postgresql python

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

          

# バックエンド仕様書

## 参考資料

[テーブル定義](https://drive.google.com/file/d/1SBlcqxVVnBg7FhLkjSUIEGMuT07aD1bL/view?usp=sharing)
※仕様書では緯度・経度がメッシュテーブルの管理となっていますが、現在の実装上では台帳テーブルで一括管理しています。
※DB は Heroku Postgres を利用しています。
[フロントエンドリポジトリ](https://github.com/yud0uhu/road-map)

## 事前準備

- src ディレクトリと同階層に csv ディレクトリを作成し、csv ファイルを置いてください。
- プライベートな情報が入っているため、git の管理から外しています。

## CSV ファイルの整形とインポート

```sh
$ sed -i -e "s/,\$//" 'CSVファイルのパス'
# ledgerテーブルにcsvファイルをインポートする
$ \copy ledger from 'CSVファイルのパス' with CSV;
```

## 実行コマンド

```sh
$ uvicorn --port 5000 --host 127.0.0.1 main:app --reload
```