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

chore(main): with LOCAL_DEV_PORT=<port number> we can run dev mode on port instead of socket #821

Merged
merged 1 commit into from
Oct 21, 2024
Merged
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
7 changes: 7 additions & 0 deletions packages/ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ Another way is to provide `clusters-config.json` and run the command like:
$ npm run dev:app
```

## Development without nginx
You also could run application without nginx, right on localhost port. All that you need to do is specify port:

```bash
LOCAL_DEV_PORT=8080 YT_AUTH_ALLOW_INSECURE=true ALLOW_PASSWORD_AUTH=true npm run dev:oss
```

### Docker

There is ability to build docker-image:
Expand Down
12 changes: 12 additions & 0 deletions packages/ui/build.app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ if (debugPort) {
console.log({debugPort}, '\n');
}

const port = Number(process.env.LOCAL_DEV_PORT);

const client: ServiceConfig['client'] = {
watchOptions: {
aggregateTimeout: 1000,
Expand All @@ -26,12 +28,22 @@ const client: ServiceConfig['client'] = {
hiddenSourceMap: false,
disableReactRefresh: true,
analyzeBundle,

...(port ? {
devServer: {
port,
}
}: null),
};

const server: ServiceConfig['server'] = {
watch: ['dist/shared'],
watchThrottle: 1000,
inspectBrk: debugPort,

...(port ? {
port: port + 1,
}: null),
};

export default {client, server};
Loading