server: add --use-ssl option
This commit is contained in:
parent
7a4076f8a6
commit
420cd8c51b
8 changed files with 94 additions and 16 deletions
|
|
@ -2,8 +2,8 @@ var ifaces = require('os').networkInterfaces(),
|
|||
address = Object.values(ifaces)
|
||||
.reduce((a,b)=>a.concat(b), [])
|
||||
.filter(i=>i.family === 'IPv4')
|
||||
.map(i=>'http://' + i.address + ':')
|
||||
.map(i=>i.address + ':')
|
||||
|
||||
module.exports = (port)=>{
|
||||
return address.map(x=>x + port)
|
||||
module.exports = (proto, port)=>{
|
||||
return address.map(x=>proto + x + port)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue