security updates part 2

This commit is contained in:
2024-06-06 15:44:28 -05:00
parent e1ab786140
commit d5e7de8f50
5 changed files with 149 additions and 133 deletions
-1
View File
@@ -16,6 +16,5 @@ docker-compose up -d'''
dart run ./test/fbla_api_test.dart'''
}
}
}
}
+10 -9
View File
@@ -2,15 +2,15 @@ This is the API for my 2023-2024 FBLA Coding & Programming App
## Installation
1. Install [Dart SDK](https://dart.dev/get-dart)
2. Clone the repo
1. Install [Dart SDK](https://dart.dev/get-dart).
2. Clone the repo .
```bash
git clone https://git.marinodev.com/MarinoDev/FBLA24.git
cd FBLA24/fbla-api/
```
3. Run `dart pub install` to install dart packages
3. Run `dart pub install` to install dart packages.
4. Install [PostgreSQL](https://www.postgresql.org/) and set it up.
5. Create `fbla` database in postgres
5. Create `fbla` database in postgres.
```SQL
CREATE DATABASE fbla
WITH
@@ -21,7 +21,7 @@ CREATE DATABASE fbla
```
Make sure to change [username] to the actual username of your postgres instance.
6. Create `businesses` table
6. Create `businesses` table.
```SQL
-- Table: public.businesses
@@ -48,8 +48,9 @@ TABLESPACE pg_default;
ALTER TABLE IF EXISTS public.businesses
OWNER to [username];
```
Make sure to change [username] to the actual username of your postgres instance
7. Create `users` table
Make sure to change [username] to the actual username of your postgres instance.
7. Create `users` table.
```SQL
-- Table: public.users
@@ -70,8 +71,8 @@ ALTER TABLE IF EXISTS public.users
OWNER to postgres;
```
8. Set environment variables `JOBLINK_POSTGRES_ADDRESS` (IP address), `JOBLINK_POSTGRES_PORT` (default 5432), `JOBLINK_POSTGRES_USERNAME`, and `JOBLINK_POSTGRES_PASSWORD` to appropriate information for your postgres database. Also set `JOBLINK_SECRET_KEY` to anything you want to generate JSON Web Tokens.
9. Set lib/create_first_user.dart username and password variables at top of file and run with `dart run lib/create_first_user.dart`
Note: the username and password you use here will be what you use to log into the app as an admin
9. Set lib/create_first_user.dart username and password variables at top of file and run with `dart run lib/create_first_user.dart`.\
Note: the username and password you use here will be what you use to log into the app as an admin.
## Usage