mirror of
https://github.com/TheBinaryNinja/tvapp2.git
synced 2026-06-04 09:15:41 -04:00
chore: add debug logs
This commit is contained in:
@@ -791,7 +791,7 @@ const server = http.createServer( ( request, response ) =>
|
|||||||
if ( loadAsset === '/' )
|
if ( loadAsset === '/' )
|
||||||
loadAsset = 'index.html';
|
loadAsset = 'index.html';
|
||||||
|
|
||||||
Log.debug( `Web server [GET]`, chalk.white( ` → ` ), chalk.grey( `${ loadAsset }` ) );
|
Log.debug( `www`, chalk.yellow( ` [GET] ` ), chalk.white( ` → ` ), chalk.grey( `${ loadAsset }` ) );
|
||||||
|
|
||||||
const handleRequest = async() =>
|
const handleRequest = async() =>
|
||||||
{
|
{
|
||||||
@@ -880,11 +880,11 @@ const server = http.createServer( ( request, response ) =>
|
|||||||
response.setHeader( 'Content-type', fileMime );
|
response.setHeader( 'Content-type', fileMime );
|
||||||
response.end( html );
|
response.end( html );
|
||||||
|
|
||||||
Log.debug( `Web server [LOAD]`, chalk.white( ` → ` ), chalk.grey( `${ loadAsset } / ${ fileMime }` ) );
|
Log.debug( `www`, chalk.green( ` [LOAD] ` ), chalk.white( ` → ` ), chalk.grey( `asset:${ loadAsset } mime:${ fileMime }` ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Log.error( `Webserver file not found:`, chalk.white( ` → ` ), chalk.grey( `${ request.url }` ) );
|
Log.error( `www file not found:`, chalk.white( ` → ` ), chalk.grey( `${ request.url }` ) );
|
||||||
|
|
||||||
response.writeHead( 404, 'Not Found' );
|
response.writeHead( 404, 'Not Found' );
|
||||||
response.end();
|
response.end();
|
||||||
|
|||||||
Reference in New Issue
Block a user