Skip to content

Commit 252d9cd

Browse files
authored
Merge pull request daquinoaldo#6 from daquinoaldo/windows-patch
Windows patch
2 parents 7aabfb4 + ec1861c commit 252d9cd

7 files changed

Lines changed: 1857 additions & 240 deletions

File tree

‎.travis.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
os:
2+
- osx
3+
- linux
4+
- windows
5+
16
language: node_js
27
node_js:
38
- node

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ It works with MacOS, Linux and Windows, on Chrome and Firefox, and requires you
66

77
[![NPM](https://nodei.co/npm/https-localhost.png)](https://nodei.co/npm/https-localhost/)
88

9-
[![Build status](https://travis-ci.org/daquinoaldo/https-localhost.svg?branch=master)](https://travis-ci.org/daquinoaldo/https-localhost)
9+
[![Build Status](https://travis-ci.com/daquinoaldo/https-localhost.svg?branch=master)](https://travis-ci.com/daquinoaldo/https-localhost)
1010
[![Coverage Status](https://coveralls.io/repos/github/daquinoaldo/https-localhost/badge.svg?branch=master)](https://coveralls.io/github/daquinoaldo/https-localhost?branch=master)
1111
[![Dependency Status](https://img.shields.io/david/daquinoaldo/https-localhost.svg)](https://david-dm.org/daquinoaldo/https-localhost)
1212
[![Known Vulnerabilities](https://snyk.io/test/npm/https-localhost/badge.svg)](https://snyk.io/test/npm/https-localhost)

‎cert/generate.js‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ const MKCERT_VERSION = "v1.3.0"
88

99
// get the executable name
1010
function getExe() {
11+
/* istanbul ignore next: tested on all platform on travis */
1112
switch (process.platform) {
1213
case "darwin":
1314
return "mkcert-" + MKCERT_VERSION + "-darwin-amd64"
1415
case "linux":
1516
return "mkcert-" + MKCERT_VERSION + "-linux-amd64"
16-
case "windows":
17+
case "win32":
1718
return "mkcert-" + MKCERT_VERSION + "-windows-amd64.exe"
1819
default:
1920
console.warn("Cannot generate the localhost certificate on your " +
@@ -45,8 +46,9 @@ function mkcert(path, exe) {
4546
"-key-file " + path + "localhost.key localhost", (err, stdout, stderr) => {
4647
console.log(stdout)
4748
console.error(stderr)
49+
/* istanbul ignore if: cannot be tested */
4850
if (err) reject(err)
49-
else resolve()
51+
resolve()
5052
})
5153
})
5254
}
@@ -66,6 +68,7 @@ async function main() {
6668
}
6769

6870
// run as script
71+
/* istanbul ignore if: cannot be tested */
6972
if (require.main === module)
7073
try { main() } catch (err) { console.error("\nExec error: " + err) }
7174

‎index.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ app.listen = function(port = process.env.PORT ||
3737

3838
// use gzip compression minify
3939
if (process.env.NODE_ENV === "production") {
40-
console.log("HOLA")
4140
app.use(compression({ threshold: 1 }))
4241
app.use(minify())
4342
app.set("json spaces", 0)

0 commit comments

Comments
 (0)