Skip to content

Commit 9980f26

Browse files
authored
docs: add "yarn serve-dev" to README (#374)
1 parent c35e218 commit 9980f26

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,18 @@ These links explain the structure and key abstractions of our codebase. It's a g
124124

125125
- GraphQL online playground: https://graphiql-online.com/
126126

127+
- Bypassing auth when developing locally
128+
129+
Start up your local server with `yarn serve-dev` (instead of `yarn serve`)
130+
```bash
131+
# Run this in open-tacos project
132+
yarn serve-dev
133+
```
134+
135+
This allows the current user to run any `Query` or `Mutation` (irrespective of the current user’s UUID)
136+
137+
(How it works: `auth/middleware.ts` and `auth/permissions.ts` are conditionally swapped out on server initialization (`server.ts`), based on whether the env var `LOCAL_DEV_BYPASS_AUTH` is set)
138+
127139
- Full stack development
128140

129141
Connect your [frontend](https://github.com/OpenBeta/open-tacos) dev env to this local server

0 commit comments

Comments
 (0)