File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,15 @@ async function main () {
69
69
// Else, use ~/.hyperspace/storage
70
70
const storage = argv . storage ? argv . storage : await getStoragePath ( )
71
71
72
- const s = createServer ( storage , argv )
72
+ const s = new Server ( {
73
+ host : argv . host ,
74
+ port : argv . port ,
75
+ storage,
76
+ network : argv . bootstrap ? { bootstrap : [ ] . concat ( argv . bootstrap ) } : null ,
77
+ noAnnounce : ! argv . announce ,
78
+ noMigrate : ! argv . migrate
79
+ } )
80
+
73
81
global . hyperspace = s
74
82
75
83
if ( ! argv . repl ) {
@@ -126,17 +134,6 @@ async function main () {
126
134
}
127
135
}
128
136
129
- function createServer ( storage , opts ) {
130
- return new Server ( {
131
- host : opts . host ,
132
- port : opts . port ,
133
- storage,
134
- network : opts . bootstrap ? { bootstrap : [ ] . concat ( opts . bootstrap ) } : null ,
135
- noAnnounce : ! opts . announce ,
136
- noMigrate : ! opts . migrate
137
- } )
138
- }
139
-
140
137
async function getStoragePath ( ) {
141
138
try {
142
139
// If this dir exists, use it.
You can’t perform that action at this time.
0 commit comments