Comparing version 2.0.7 to 2.0.8
20
index.js
const http = require('http'); | ||
// Server component | ||
@@ -40,7 +41,19 @@ const server = http.createServer((req, res) => { | ||
module.exports = { | ||
/*the listen method checks if the port parameter is provided. | ||
If it is, it uses that value. Otherwise, it checks if process.env.PORT is available. | ||
If both are not available, it defaults to port 31415.*/ | ||
listen: (port) => { | ||
server.listen(port, () => { | ||
console.log(`netget server is listening on port ${port}`); | ||
const resolvedPort = port || process.env.PORT || 31415; | ||
server.listen(resolvedPort, () => { | ||
console.log("netget server is listening on port: " + resolvedPort); | ||
}); | ||
}, | ||
close: () => { | ||
if (server) { | ||
server.close(() => { | ||
console.log('netget server has been closed'); | ||
}); | ||
} | ||
}, | ||
connect: (host, port) => { | ||
@@ -54,5 +67,2 @@ connect(host, port); | ||
console.log("indexing netget..."); | ||
{ | ||
"name": "netget", | ||
"version": "2.0.7", | ||
"version": "2.0.8", | ||
"description": "Rette Adepto/ Recibido Directamente.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4178
61
2