Change tests for new Typescript change

This commit is contained in:
Samer Albahra
2019-05-13 20:54:03 -05:00
parent e94f8bf8ff
commit caf381ab73
9 changed files with 198 additions and 6040 deletions

View File

@@ -5,8 +5,6 @@ import * as cors from "cors";
import * as weather from "./routes/weather";
import * as local from "./routes/local";
const packageJson = require( "../package.json" );
let host = process.env.HOST || "127.0.0.1",
port = parseInt( process.env.PORT ) || 3000;
@@ -29,7 +27,7 @@ if ( pws === "WU" ) {
}
app.get( "/", function( req, res ) {
res.send( packageJson.description + " v" + packageJson.version );
res.send( process.env.npm_package_description + " v" + process.env.npm_package_version );
} );
// Handle 404 error
@@ -40,9 +38,9 @@ app.use( function( req, res ) {
// Start listening on the service port
app.listen( port, host, function() {
console.log( "%s now listening on %s:%d", packageJson.description, host, port );
console.log( "%s now listening on %s:%d", process.env.npm_package_description, host, port );
if (pws !== "none" ) {
console.log( "%s now listening for local weather stream", packageJson.description );
console.log( "%s now listening for local weather stream", process.env.npm_package_description );
}
} );