Skip to content

Commit

Permalink
docs: add "yarn serve-dev" to README (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
l4u532 committed Jan 2, 2024
1 parent c35e218 commit 9980f26
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,18 @@ These links explain the structure and key abstractions of our codebase. It's a g

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

- Bypassing auth when developing locally

Start up your local server with `yarn serve-dev` (instead of `yarn serve`)
```bash
# Run this in open-tacos project
yarn serve-dev
```

This allows the current user to run any `Query` or `Mutation` (irrespective of the current user’s UUID)

(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)

- Full stack development

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

0 comments on commit 9980f26

Please sign in to comment.