fix(main.js): color of 404 status in console logs (#46) master
authorRaphael von der Grün <raphinesse@gmail.com>
Sat, 16 Oct 2021 10:50:26 +0000 (12:50 +0200)
committerGitHub <noreply@github.com>
Sat, 16 Oct 2021 10:50:26 +0000 (12:50 +0200)
src/main.js

index e651f1266abeb6b72379c247f3e94b2b152cbee5..20449ce3ca5d15fb903e68b4092cc045c2b166c7 100644 (file)
@@ -31,7 +31,7 @@ function CordovaServe () {
     // Attach this before anything else to provide status output
     this.app.use((req, res, next) => {
         res.on('finish', function () {
-            const color = this.statusCode === '404' ? chalk.red : chalk.green;
+            const color = this.statusCode === 404 ? chalk.red : chalk.green;
             let msg = `${color(this.statusCode)} ${this.req.originalUrl}`;
             const encoding = this.getHeader('content-encoding');
             if (encoding) {