]> PHS Git Server - phs-api.git/commitdiff
Fixing closures on app.js file.
authorcharleswrayjr <charleswrayjr@gmail.com>
Mon, 8 Sep 2025 18:22:26 +0000 (13:22 -0500)
committercharleswrayjr <charleswrayjr@gmail.com>
Mon, 8 Sep 2025 18:22:26 +0000 (13:22 -0500)
app.js

diff --git a/app.js b/app.js
index 75033551c4d7ebfea13c5cf26c399c4764ee6e1f..a79f2300c7a39e2c68d1345c6c70565947171f62 100755 (executable)
--- a/app.js
+++ b/app.js
@@ -19,16 +19,16 @@ const sshConfig = {
 };
 
 const buffer = require('buffer');
-global.Blob = buffer.Blob
+global.Blob = buffer.Blob;
 
 const app = express();
 const http = require( 'http' ).createServer( app );
 
-app.set('etag', false)
+app.set('etag', false);
 
 app.use((req, res, next) => {
   res.set('Cache-Control', 'no-store');
-  next()
+  next();
 });
 
 global.phsdb = phsdb;
@@ -157,8 +157,8 @@ process.on('unhandledRejection', (err) => {
 app.use( function ( req, res, next ) {
   if (req.url === '/.well-known/appspecific/com.chrome.devtools.json' ) next();
   else {
-    logger.debug(req.originalUrl)
-    logger.debug(req.headers['x-forwarded-for'])
+    logger.debug(req.originalUrl);
+    logger.debug(req.headers['x-forwarded-for']);
     next( createError( 404 ) );
   }
 
@@ -227,11 +227,9 @@ const errorHandler = ( err, req, res, next ) => {
     // render the error page
     res.status( err.status || 500 );
     res.send(err);
-  } else next()
+  } else next();
 };
 
 app.use( errorHandler );
 
-console.log('running on ' + port);
-
 module.exports = app;