Skip to content

Commit

Permalink
fix: use aws4fetch to connect to aws
Browse files Browse the repository at this point in the history
  • Loading branch information
vinicenter committed Feb 24, 2024
1 parent 601527a commit 585baef
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 1,294 deletions.
7 changes: 2 additions & 5 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# This is for binding an D1 database to the application
DB=""

NUXT_BUCKET_R2_PUBLIC_ENDPOINT=""
NUXT_BUCKET_R2_ENDPOINT=""
NUXT_BUCKET_R2_ACCESS_KEY_ID=""
NUXT_BUCKET_R2_SECRET_ACCESS_KEY=""
NUXT_BUCKET_R2_NAME=""
NUXT_BUCKET_R2_REGION=""

NUXT_BUCKET_R2_PUBLIC_ENDPOINT=""
NUXT_BUCKET_R2_SECRET_ACCESS_KEY=""
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
.cache
dist

# Cloudflare envrionment testing
.wrangler

# Node dependencies
node_modules

Expand All @@ -21,4 +24,7 @@ logs
# Local env files
.env
.env.*
!.env.example
!.env.example

# Database
db.sqlite
3 changes: 1 addition & 2 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ export default defineNuxtConfig({
},
runtimeConfig: {
DB: process.env.DB as string,
BUCKET_R2_ENDPOINT: process.env.NUXT_BUCKET_ENDPOINT as string,
BUCKET_R2_ENDPOINT: process.env.NUXT_BUCKET_R2_ENDPOINT as string,
BUCKET_R2_ACCESS_KEY_ID: process.env.NUXT_BUCKET_R2_ACCESS_KEY_ID as string,
BUCKET_R2_SECRET_ACCESS_KEY: process.env.NUXT_BUCKET_R2_SECRET_ACCESS_KEY as string,
BUCKET_R2_NAME: process.env.NUXT_BUCKET_R2_NAME as string,
BUCKET_R2_REGION: process.env.NUXT_BUCKET_R2_REGION as string,
public: {
BUCKET_R2_PUBLIC_ENDPOINT: process.env.NUXT_BUCKET_R2_PUBLIC_ENDPOINT as string,
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
"postinstall": "nuxt prepare"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.521.0",
"@aws-sdk/s3-request-presigner": "^3.521.0",
"@iconify-json/mdi": "^1.1.64",
"@libsql/client": "^0.5.1",
"aws4fetch": "1.0.13",
"better-sqlite3": "^9.4.3",
"drizzle-kit": "^0.20.14",
"drizzle-orm": "^0.29.4",
Expand Down
Loading

0 comments on commit 585baef

Please sign in to comment.