data/edge5cdab/modbus & logging

This commit is contained in:
2026-07-02 18:39:43 +05:00
parent f5dd5a7f7f
commit d7bfaa678e
12 changed files with 117 additions and 39 deletions

View File

@@ -3,6 +3,8 @@ import { createServer } from 'node:http'
import { dirname, join } from 'node:path'
import { fileURLToPath } from 'node:url'
import { log } from '../helpers/log.js'
const httpPort = Number(process.env.HTTP_PORT)
const publicDir = join(dirname(fileURLToPath(import.meta.url)), '../../public')
const indexPath = join(publicDir, 'index.html')
@@ -24,5 +26,5 @@ createServer(async (req, res) => {
res.writeHead(404).end('Not Found')
}).listen(httpPort, () => {
console.log('http.server_started', { port: httpPort })
log('http.server_started', { port: httpPort })
})