Skip to content

Commit

Permalink
Remove prod playground
Browse files Browse the repository at this point in the history
Since it requires prod database credentials, most user wont be able to
use it.  Playground can still be run against prod database using the
proper DATABASE_URL.
  • Loading branch information
needs committed Mar 5, 2024
1 parent c6a1b9f commit 645d06f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
"preinstall": "npx only-allow npm",
"prepare": "husky install && bash playground/setup-playground.sh",
"proxy-prod": "fly proxy 5434:5432 --app teerankio-postgres",
"playground:dev": "ts-node playground/playground.dev.ts",
"playground:prod": "DATABASE_URL=postgres://postgres-test:postgres-test@localhost:5434/teerank ts-node playground/playground.prod.ts"
"playground": "ts-node playground/playground.ts"
},
"private": true,
"devDependencies": {
Expand Down
4 changes: 1 addition & 3 deletions playground/example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ export const prisma = new PrismaClient({
});

async function main() {
// This is a playground to test the code. Run it using `npm run playground:dev`
// or `npm run playground:prod`. Be careful with the code you write here if
// you are running it against prod.
// This is a playground to test the code. Run it using `npm run playground`.
}

main()
3 changes: 1 addition & 2 deletions playground/setup-playground.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
cp -n playground/example.ts playground/playground.dev.ts
cp -n playground/example.ts playground/playground.prod.ts
cp -n playground/example.ts playground/playground.ts
echo "Playground setup complete"

0 comments on commit 645d06f

Please sign in to comment.