238ea29fa8
* Removes un-used and non-functional code coverage helpers * Removes un-used release script aliases * Moves TLS to a lib folder for cleaner directory structure * Implements start.py as start.js for the GN build * Adds a re-usable getElectronExec helper for future scripts * Refactors spec runner to use the helper
18 lines
446 B
JavaScript
18 lines
446 B
JavaScript
var fs = require('fs')
|
|
var https = require('https')
|
|
var path = require('path')
|
|
|
|
var server = https.createServer({
|
|
key: fs.readFileSync(path.resolve(__dirname, 'tls.key.pem')),
|
|
cert: fs.readFileSync(path.resolve(__dirname, 'tls.cert.pem'))
|
|
}, (req, res) => {
|
|
res.end(JSON.stringify({ protocol: req.socket.getProtocol() }))
|
|
|
|
setTimeout(() => {
|
|
server.close()
|
|
}, 0)
|
|
})
|
|
|
|
server.listen(0, () => {
|
|
console.log(server.address().port)
|
|
})
|