Skip to content

3wish/Simple-note

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instroduction

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.

Frontend

I use Vue3 in the composition API of <script setup>. Subtitute Pinia for Vuex and use the Vue Router of version 4.

Setup

Install dependencies:

$ npm install

Backend

The ORM tool is the sqlalchemy and the migration tool the alembic.

Migrations

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

Deployment with nginx

Run the FastAPI:

$ uvicorn app.main:app

Start the nginx

$ systemctl start nginx

About

A simple note web app implemented by fastapi and vue3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published