bug fixes

This commit is contained in:
2024-04-07 13:18:44 -05:00
parent fee7ea5678
commit 7b0ac130f8
4 changed files with 18 additions and 6 deletions
+6 -4
View File
@@ -7,9 +7,9 @@ This is the API for my 2023-2024 FBLA Coding & Programming App
3. Clone the repo
```
git clone https://git.marinodev.com/MarinoDev/FBLA24.git
cd FBLA24/api/
cd FBLA24/fbla-api/
```
3. Run `dart pub install` to install dart packages
4. Run `dart pub install` to install dart packages
## Usage
@@ -22,7 +22,8 @@ CREATE DATABASE fbla
CONNECTION LIMIT = -1
IS_TEMPLATE = False;
```
Make sure to change [username] to the actual username of your postgres instance
Make sure to change [username] to the actual username of your postgres instance.
2. Create `businesses` table
```
-- Table: public.businesses
@@ -51,6 +52,7 @@ ALTER TABLE IF EXISTS public.businesses
OWNER to [username];
```
Make sure to change [username] to the actual username of your postgres instance
3. Create `users` table
```
-- Table: public.users
@@ -76,4 +78,4 @@ ALTER TABLE IF EXISTS public.users
Note: the username and password you use here will be what you use to log into the app as an admin
6. Your database should be all set up! Start the API with `dart run lib/fbla_api.dart` or alternatively, run it in a docker container with [Docker Build](https://docs.docker.com/reference/cli/docker/image/build/) and [Docker Compose](https://docs.docker.com/compose/) using the included [Dockerfile](Dockerfile) and [docker-compose.yml](docker-compose.yml) files. If using `Docker Compose`, change the first portion of the volumes path on line 9 to any desired storage location.
Note the address it is serving at, you will need this to connect it to the UI, and to run tests.
7. Test your api with `dart run test/fbla_api_test.dart`, setting `apiAddress` on line 8 to your api address.
7. Test your api with `dart run test/fbla_api_test.dart`, setting `apiAddress` on line 8 to your api address.