File tree 3 files changed +7
-2
lines changed
3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " nodecg-gui" ,
3
- "version" : " 0.0.1 " ,
3
+ "version" : " 0.0.2 " ,
4
4
"license" : " MIT" ,
5
5
"scripts" : {
6
6
"dev" : " electron-webpack dev" ,
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ function getNodeCGUrl(e?: Electron.IpcMainEvent) {
70
70
const uri = new URI ( )
71
71
. protocol ( 'http' )
72
72
. hostname ( config . host || 'localhost' )
73
- . port ( config . port . toString ( ) || '9090' ) ;
73
+ . port ( config . port || '9090' ) ;
74
74
const retVal = uri . toString ( ) ;
75
75
if ( e !== undefined ) e . returnValue = retVal ;
76
76
return retVal ;
Original file line number Diff line number Diff line change @@ -13,6 +13,11 @@ interface ConfigData {
13
13
export function readConfig ( confFile : string ) {
14
14
let config : ConfigData = { } ;
15
15
16
+ if ( ! fs . existsSync ( nodecgPath ( 'cfg' ) ) ) {
17
+ console . log ( "cfg dir does not exist, creating" ) ;
18
+ fs . mkdirSync ( nodecgPath ( 'cfg' ) ) ;
19
+ }
20
+
16
21
let confPath = nodecgPath ( 'cfg' , `${ confFile } .json` ) ;
17
22
try {
18
23
const rawConfig = fs . readFileSync ( confPath ) ;
You can’t perform that action at this time.
0 commit comments