Skip to content

Commit

Permalink
chore(main): with LOCAL_DEV_PORT=<port number> we can run dev mode on…
Browse files Browse the repository at this point in the history
… port instead of socket + updated README
  • Loading branch information
vrozaev committed Oct 18, 2024
1 parent 9badece commit ced557b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
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};

0 comments on commit ced557b

Please sign in to comment.