This project is a simple note web app, just a learning material using FastAPI and Vue3. I get the inspiration from testdrivenio / fastapi-vue but has something different with it.
I use Vue3 in the composition API of <script setup>
. Subtitute Pinia for Vuex and use the Vue Router of version 4.
Install dependencies:
$ npm install
The ORM tool is the sqlalchemy and the migration tool the alembic.
Modify the value of sqlalchemy.url
in file alembic.ini
:
sqlalchemy.url = mysql+pymysql://username:password@ip/database_name
Generate the migration script:
$ alembic revision -m --autogenerate "comment"
Run the migration:
$ alembic upgrade head
Run the FastAPI:
$ uvicorn app.main:app
Start the nginx
$ systemctl start nginx