This web application is developed using a Svelte client framework, deployed using Axios. The user interface communicates with a Python script using FastAPI and is deployed with Uvicorn.
Plans are in place to implement a relational database of some sort. But for a working case, the data is currently stored a json formatted file.
- Python 3
Install according to your OS. You may want to install pypip install py
- FastAPI
pip install fastapi
- Uvicorn
pip install uvicorn[standard]
Once the requirements are installed run python ./api.py
from the commandline in the project's API directory to start the API service. Visit http://127.0.0.1:8001/docs
to view the available endpoints and to test the API.
Right now, the UI only demonstrates a simple [GET]
call to the API, returning a list of recordsets. As development progresses, a full CRUD stack will be implemented. If you are forking this project, you should be able to npm install
within the ui
directory without further configuration.
- Node
Install according to your OS - Svelte
npm install svelte
- degit
npx degit sveltejs/template my-svelte-project npm install
- Axios
npm install axios
Once all the pacakages are installed, start the service using npm run dev
. The default deployment location is http://127.0.0.1:5000
.
The default rollup.config.js
presented issues using a vanilla install of Axios. Line 7
and Line 11
were added in the document to prevent the JSON errors.
GitHub has a great resource for .gitignore
templates. If you plan on further expanding to other environments, it is recommended to look through them. This project implements the Node.gitignore template.