Skip to content

Commit 70e4ed0

Browse files
feat(overmind): allow using true to connect to default locahost and port
1 parent 88f1e75 commit 70e4ed0

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

packages/node_modules/overmind/src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,11 @@ export class Overmind<Config extends Configuration> implements Configuration {
127127
options.devtools ||
128128
(location.hostname === 'localhost' && options.devtools !== false)
129129
) {
130-
this.initializeDevtools(options.devtools, eventHub, proxyStateTree)
130+
this.initializeDevtools(
131+
options.devtools === true ? 'localhost:3031' : options.devtools,
132+
eventHub,
133+
proxyStateTree
134+
)
131135
} else {
132136
warning +=
133137
'\n\n - You are not running on localhost. You will have to manually define the devtools option to connect'

packages/overmind-website/api/overmind.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ h(Example, { name: "api/app_addMutationListener" })
1818

1919

2020
## options.devtools
21-
By default the application connects to the devtools on **localhost:3031**, but you can change this in case you need to use an IP address ot the devtools has configured with a different port.
21+
If you develop your app on localhost the application connects to the devtools on **localhost:3031**. You can change this in case you need to use an IP address, the devtools is configured with a different port or you want to connect to localhost (with default port) even though the app is not on localhost.
2222

2323
```marksy
2424
h(Example, { name: "api/app_options_devtools" })

packages/overmind-website/examples/api/app_options_devtools.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default (ts) =>
77
...
88
99
export const overmind = new Overmind(config, {
10-
devtools: 'localhost:3031'
10+
devtools: true // 'localhost:3031'
1111
})
1212
`,
1313
},
@@ -19,7 +19,7 @@ export const overmind = new Overmind(config, {
1919
...
2020
2121
export const overmind = new Overmind(config, {
22-
devtools: 'localhost:3031'
22+
devtools: true // 'localhost:3031'
2323
})
2424
`,
2525
},

0 commit comments

Comments
 (0)