Skip to content

Commit

Permalink
chore(api): clean up api runs for local dev (#3572)
Browse files Browse the repository at this point in the history
* fix(api): remove admin server start from public server module

With the removal of the 'require.main' check, the admin server gets
started once on import and then again in the explicit admin server call
in graphql-main-server.ts. This is to remove the 2nd call from
main-server.

* fix(api): re-add 'require.main' check & admin call from main server

This was removed to support using bun as a runner.
(see oven-sh/bun#4818 (comment))

There are other issues with bun as well for now, so I'm reverting this
until we need to use bun as a runner and the issue is still not fixed in
bun.

* chore(api): swap ts-node for tsx

* chore(api): add package.json scripts for dev servers

* build: add dev-public & dev-admin commands to BUCK

* build: add dev option for til api run

* build: add local file srcs to dev-api rule

* chore(api): remove admin server redundant run code

* refactor(api): separate public/admin/run api code

* chore: switch tsx in bats test helper

* chore: switch tsx in top-level bats test helper
  • Loading branch information
vindard authored Nov 21, 2023
1 parent dee05db commit e7edca1
Show file tree
Hide file tree
Showing 10 changed files with 649 additions and 397 deletions.
8 changes: 4 additions & 4 deletions bats/helpers/subscriber/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "subscriber",
"scripts": {
"subscriber": "ts-node src/gql-subscribe.ts"
"subscriber": "tsx src/gql-subscribe.ts"
},
"devDependencies": {
"@types/ws": "^8.5.8",
"@types/node": "^20.8.7",
"ws": "^8.14.2",
"@types/ws": "^8.5.8",
"graphql-ws": "^5.14.1",
"ts-node": "^10.9.1"
"tsx": "^4.2.0",
"ws": "^8.14.2"
}
}
Loading

0 comments on commit e7edca1

Please sign in to comment.