diff --git a/src/serve_data.js b/src/serve_data.js index e63d9f325..6369aa21d 100644 --- a/src/serve_data.js +++ b/src/serve_data.js @@ -22,10 +22,13 @@ import { openMbTilesWrapper } from './mbtiles_wrapper.js'; import fs from 'node:fs'; import { fileURLToPath } from 'url'; const packageJson = JSON.parse( - fs.readFileSync(path.dirname(fileURLToPath(import.meta.url)) + '/../package.json', 'utf8'), + fs.readFileSync( + path.dirname(fileURLToPath(import.meta.url)) + '/../package.json', + 'utf8', + ), ); -const isLight = (packageJson.name.slice(-6) === '-light'); +const isLight = packageJson.name.slice(-6) === '-light'; const serve_rendered = ( await import(`${!isLight ? `./serve_rendered.js` : `./serve_light.js`}`) ).serve_rendered; diff --git a/src/server.js b/src/server.js index b30e28f2f..45d7931ac 100644 --- a/src/server.js +++ b/src/server.js @@ -28,7 +28,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url)); const packageJson = JSON.parse( fs.readFileSync(__dirname + '/../package.json', 'utf8'), ); -const isLight = (packageJson.name.slice(-6) === '-light'); +const isLight = packageJson.name.slice(-6) === '-light'; const serve_rendered = ( await import(`${!isLight ? `./serve_rendered.js` : `./serve_light.js`}`)