From fb02a0f79f7da0ffd0fd568e80fcb88188cf012d Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Mon, 1 Jul 2024 18:00:31 -0700 Subject: [PATCH] some auth cleanup --- .env | 1 - .gitignore | 1 - README.md | 3 ++- common/.gitignore | 1 + stacks/auth.ts | 2 +- stacks/index.ts | 7 +++++++ web/package.json | 4 ++-- 7 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.env b/.env index ebcc3c0..01db89f 100644 --- a/.env +++ b/.env @@ -1,6 +1,5 @@ PRISMA_CONNECTION_LIMIT=5 CREATE_AURORA_DATABASE=true -AUTH_SECRET="663F6Z2VT8IIKhbkPanZlx0Q/eQk7asTxIaEzZHCcWY=" # for local dev environments which use docker-compose, you can disable running migrations in AWS by setting this to false RUN_DB_MIGRATIONS=true diff --git a/.gitignore b/.gitignore index 2e4ca2b..4680220 100644 --- a/.gitignore +++ b/.gitignore @@ -23,7 +23,6 @@ npm-debug.log* yarn-debug.log* yarn-error.log* -!jest.config.js # TSC build output /dist diff --git a/README.md b/README.md index 9279101..0c73f8a 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,8 @@ Assumes you have [Node 20](https://nodejs.org/en/download/current/) installed an ### Setup +Edit `sst.config.ts` and set your default AWS profile and region. + ```shell npm i -g pnpm # install pnpm globally pnpm i # install dependencies + generate types from DB and GQL schemas @@ -28,7 +30,6 @@ Set your default AWS profile and region in `sst.config.ts`. Edit .env or .env.$stage to set infrastructure vars. - ## Features All features are optional, delete what you don't need. diff --git a/common/.gitignore b/common/.gitignore index c2658d7..d676969 100644 --- a/common/.gitignore +++ b/common/.gitignore @@ -1 +1,2 @@ node_modules/ +graphql/generated diff --git a/stacks/auth.ts b/stacks/auth.ts index 676a41b..442d5fc 100644 --- a/stacks/auth.ts +++ b/stacks/auth.ts @@ -7,7 +7,7 @@ import { Dns } from './dns'; import { WEB_URL } from './config'; const ALLOWED_HOSTS = [ - 'http://localhost:3000', + 'http://localhost:6001', /// ... add frontend hosts here ]; const ALLOWED_URLS = ['/login', '/api/auth/callback/cognito']; diff --git a/stacks/index.ts b/stacks/index.ts index 8efa0de..f3d273a 100644 --- a/stacks/index.ts +++ b/stacks/index.ts @@ -24,6 +24,13 @@ export default function main(app: sst.App) { app.setDefaultFunctionProps({ runtime: 'nodejs20.x', architecture: 'arm_64', + environment: { + NODE_OPTIONS: '--enable-source-maps', + }, + tracing: 'active', + nodejs: { + sourcemap: true, + }, // N.B. bundle settings are defined in Layers }); diff --git a/web/package.json b/web/package.json index c8ef6f1..aeaec89 100644 --- a/web/package.json +++ b/web/package.json @@ -3,8 +3,8 @@ "version": "0.1.0", "private": true, "scripts": { - "dev": "sst bind 'next dev --port 3020'", - "dev:turbo": "sst bind 'next dev --port 3020 --turbo'", + "dev": "sst bind 'next dev --port 6001'", + "dev:turbo": "sst bind 'next dev --port 6001 --turbo'", "build": "next build", "start": "next start", "lint": "next lint",