diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..d8cf3a1 --- /dev/null +++ b/.env.example @@ -0,0 +1,4 @@ +EXPO_PUBLIC_API_DOMAIN=....ngrok-free.app +AWS_BUCKET_NAME=... +AWS_ACCESS_KEY=... +AWS_SECRET_KEY=... diff --git a/README.md b/README.md index ec6d5f8..58006a3 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,9 @@ of requests from the database. [Task](https://taskfile.dev) speeding up development by running long commands in quick phrases. -[Nodemon](https://www.npmjs.com/package/nodemon) a tool that watches code and +- Check out all of our commands in the `Taskfile.yaml` file! + +[Nodemon](https://www.npmjs.com/package/nodemon) | (optional) a tool that watches code and reloads the build if it sees changes. ## Before Running @@ -63,6 +65,7 @@ Create an .env file in the root directory: ``` EXPO_PUBLIC_API_DOMAIN=your-ngrok-static-domain-here + AWS_BUCKET_NAME=your-aws-s3-bucket-name-here AWS_ACCESS_KEY=your-aws-access-key-here AWS_SECRET_KEY=your-aws-secret-key-here ``` @@ -75,6 +78,14 @@ item below! [Pre-commit](https://pre-commit.com) standardizing code style and commits +After installing, in the base folder run: + +``` +task pre-commit +``` + +This will run and install all of our hooks to ensure consistent formatting and structure in the code base. + [Commitizen](https://commitizen-tools.github.io/commitizen/) organizing our commits into categories @@ -84,6 +95,7 @@ commits into categories 2. In the base of the repo: run `task start-docker` 3. Then, open a new tab to run commands in: run `task start-backend` or `task start-dev` + - `task start-dev` utilizes nodemon to check for updates in the backend so installing nodemon is necessary to run this command - You can now view swagger: http://localhost:8080/swagger/index.html 4. Next, in a new tab run `task start-ngrok` 5. Finally, open one last new tab: run `task start-frontend` diff --git a/backend/schema/files/transactions.go b/backend/schema/files/transactions.go index 136273b..05b8c72 100644 --- a/backend/schema/files/transactions.go +++ b/backend/schema/files/transactions.go @@ -7,6 +7,7 @@ import ( "fmt" "io" "mime/multipart" + "os" "strconv" "strings" "time" @@ -17,7 +18,7 @@ import ( "github.com/jackc/pgx/v5/pgxpool" ) -var AWS_BUCKET_NAME = "care-wallet-storage" +var AWS_BUCKET_NAME, _ = os.LookupEnv("AWS_BUCKET_NAME") type FileDetails struct { FileID int `json:"fileId"`