Skip to content

Commit

Permalink
some auth cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
revmischa committed Jul 2, 2024
1 parent 19fc780 commit fb02a0f
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 6 deletions.
1 change: 0 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*

!jest.config.js

# TSC build output
/dist
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
1 change: 1 addition & 0 deletions common/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules/
graphql/generated
2 changes: 1 addition & 1 deletion stacks/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand Down
7 changes: 7 additions & 0 deletions stacks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
Expand Down
4 changes: 2 additions & 2 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit fb02a0f

Please sign in to comment.