Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge queue: embarking main (96b9e0c) and #3581 together #3582

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions apps/wing-console/console/app/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Contributing to Wing Console

## Start dev mode

```sh
pnpm dev
```

Also, you have to start the dev script on the `apps/wing-console/console/server` package.
2 changes: 1 addition & 1 deletion apps/wing-console/console/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
],
"scripts": {
"preview": "node scripts/preview.mjs",
"dev": "node scripts/dev.mjs",
"dev": "tsx watch scripts/dev.mjs",
"compile": "tsup",
"eslint": "eslint --ext .js,.cjs,.ts,.cts,.mts,.tsx --no-error-on-unmatched-pattern . --fix",
"test": "playwright test --update-snapshots",
Expand Down
26 changes: 15 additions & 11 deletions apps/wing-console/console/app/scripts/dev.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,11 @@ const options = parseArgs({
},
});

const vite = await createViteServer({
...viteConfig,
server: { middlewareMode: true },
});

const { port } = await createConsoleServer({
const consoleServer = await createConsoleServer({
wingfile:
options.values.wingfile ??
fileURLToPath(new URL("../demo/index.w", import.meta.url)),
requestedPort: 1214,
async onExpressCreated(app) {
app.use(vite.middlewares);
},
log: {
info: console.log,
error: console.error,
Expand All @@ -49,6 +41,18 @@ const { port } = await createConsoleServer({
requireAcceptTerms: true,
});

await open(`http://localhost:${port}`);
const vite = await createViteServer({
...viteConfig,
server: {
proxy: {
"/trpc": {
target: `http://localhost:${consoleServer.port}`,
changeOrigin: true,
ws: true,
},
},
open: true,
},
});

console.log(`Wing Console is running on http://localhost:${port}/`);
await vite.listen();
7 changes: 7 additions & 0 deletions apps/wing-console/console/server/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Contributing to `@wingconsole/server`

## Start dev mode

```sh
pnpm dev
```
Loading