piclist 1.3.1 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/picgo-server CHANGED
@@ -194,9 +194,7 @@ class Server {
194
194
  this.config = config
195
195
  } else {
196
196
  config = {
197
- port: 36677,
198
- host: '127.0.0.1',
199
- enable: true
197
+ port: 36677
200
198
  }
201
199
  this.config = config
202
200
  picgo.saveConfig({
@@ -295,7 +293,7 @@ class Server {
295
293
  if (typeof port === 'string') {
296
294
  port = parseInt(port, 10)
297
295
  }
298
- this.httpServer.listen(port, this.config.host).on('error', async err => {
296
+ this.httpServer.listen(port, '0.0.0.0').on('error', async err => {
299
297
  if (err.errno === 'EADDRINUSE') {
300
298
  try {
301
299
  await axios.post(ensureHTTPLink(`${this.config.host}:${port}/heartbeat`))
@@ -310,9 +308,7 @@ class Server {
310
308
 
311
309
  startup() {
312
310
  console.log('startup', this.config.enable)
313
- if (this.config.enable) {
314
- this.listen(this.config.port)
315
- }
311
+ this.listen(this.config.port)
316
312
  }
317
313
 
318
314
  shutdown(hasStarted) {