feat: show os at startup

Signed-off-by: acalcutt <acalcutt@techidiots.net>
This commit is contained in:
acalcutt 2023-04-05 07:17:17 -04:00 committed by Andrew Calcutt
parent 48f46569ab
commit 4035e5f455
2 changed files with 4 additions and 2 deletions

View file

@ -4,6 +4,7 @@
import fs from 'node:fs';
import path from 'path';
import os from 'os';
import { fileURLToPath } from 'url';
import request from 'request';
import { server } from './server.js';
@ -54,6 +55,7 @@ program.parse(process.argv);
const opts = program.opts();
console.log(`Starting ${packageJson.name} v${packageJson.version}`);
console.log(`${os.version()} ${os.arch}`);
const startServer = (configPath, config) => {
let publicUrl = opts.public_url;

View file

@ -3,6 +3,7 @@
import advancedPool from 'advanced-pool';
import fs from 'node:fs';
import path from 'path';
import os from 'os';
import url from 'url';
import util from 'util';
import zlib from 'zlib';
@ -18,8 +19,7 @@ import proj4 from 'proj4';
import request from 'request';
import { getFontsPbf, getTileUrls, fixTileJSONCenter } from './utils.js';
import Os from 'os';
const ostype = Os.platform() == 'win32' ? 'windows' : 'unix';
const ostype = os.platform() == 'win32' ? 'windows' : 'unix';
const { sharp, createCanvas, Image } = await import(
`./serve_rendered_${ostype}.js`
);