File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,13 @@ declare namespace electronServe {
15
15
*/
16
16
scheme ?: string ;
17
17
18
+ /**
19
+ Custom hostname.
20
+
21
+ @default '-'
22
+ */
23
+ hostname ?: string ;
24
+
18
25
/**
19
26
Whether [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) should be enabled.
20
27
Useful for testing purposes.
Original file line number Diff line number Diff line change @@ -26,7 +26,8 @@ const getPath = async path_ => {
26
26
module . exports = options => {
27
27
options = Object . assign ( {
28
28
isCorsEnabled : true ,
29
- scheme : 'app'
29
+ scheme : 'app' ,
30
+ hostname : '-'
30
31
} , options ) ;
31
32
32
33
if ( ! options . directory ) {
@@ -72,6 +73,6 @@ module.exports = options => {
72
73
} ) ;
73
74
74
75
return async window_ => {
75
- await window_ . loadURL ( `${ options . scheme } ://- ` ) ;
76
+ await window_ . loadURL ( `${ options . scheme } ://${ options . hostname } ` ) ;
76
77
} ;
77
78
} ;
Original file line number Diff line number Diff line change @@ -57,6 +57,13 @@ Default: `'app'`
57
57
58
58
Custom scheme. For example, ` foo ` results in your ` directory ` being available at ` foo://- ` .
59
59
60
+ ##### hostname
61
+
62
+ Type: ` string ` \
63
+ Default: ` '-' `
64
+
65
+ Custom hostname.
66
+
60
67
##### isCorsEnabled
61
68
62
69
Type: ` boolean ` \
You can’t perform that action at this time.
0 commit comments