File tree 2 files changed +13
-2
lines changed 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ module.exports = {
76
76
It should return an object with a close() method (as ExpressJS app does)
77
77
/*/ server : {
78
78
// viewing url is http://localhost:3000
79
- port : 3000
79
+ port : parseInt ( NC_CONFIG . port )
80
80
} ,
81
81
82
82
/// NPM INTEGRATION ///////////////////////////////////////////////////////////
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ const shell = require('shelljs');
4
4
let argv = require ( 'minimist' ) ( process . argv . slice ( 2 ) ) ;
5
5
let dataset = argv [ 'dataset' ] ;
6
6
let googlea = argv [ 'googlea' ] ;
7
+ let port = argv [ 'port' ] ;
7
8
8
9
shell . echo ( `
9
10
+------------------------+
@@ -55,19 +56,29 @@ if (googlea === undefined || googlea === '') {
55
56
` ) ;
56
57
}
57
58
59
+
60
+ // port
61
+ if ( port === undefined || port === '' ) {
62
+ port = 3000 ;
58
63
}
64
+ shell . echo ( `
65
+ 3. Setting port to ${ port }
66
+ Use './nc.js --port=xxxx' to define a diferent port.\n
67
+ ` ) ;
68
+
59
69
60
70
let script = `
61
71
// this file generated by NC command
62
72
const NC_CONFIG = {
63
73
dataset: "${ dataset } ",
74
+ port: "${ port } ",
64
75
googlea: "${ googlea } "
65
76
};
66
77
if (typeof process === "object") module.exports = NC_CONFIG;
67
78
if (typeof window === "object") window.NC_CONFIG = NC_CONFIG;`
68
79
let js = shell . ShellString ( script ) . to ( 'app/assets/netcreate-config.js' ) ;
69
80
70
- shell . echo ( ` 3 . Starting dev server...
81
+ shell . echo ( ` 4 . Starting dev server...
71
82
\n
72
83
\n` ) ;
73
84
You can’t perform that action at this time.
0 commit comments