Skip to content

Commit

Permalink
feat(server): Log hslayers-server version on startup
Browse files Browse the repository at this point in the history
to allow easier debugging
  • Loading branch information
jmacura committed Jan 31, 2024
1 parent e401e65 commit d1ce8a8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions projects/hslayers-server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import yargs from 'yargs';
import path from 'node:path';
import { existsSync, mkdirSync } from 'node:fs';

import packageJson from './package.json' assert { type: 'json'};

let envExists = existsSync('.env');
if (!envExists)
console.warn('\x1b[33m%s\x1b[0m', 'No .env file found! You will need to create one to configure your services.');
Expand Down Expand Up @@ -48,3 +50,4 @@ if (argv.layman) {
else
import('./src/layman.js');
}
console.log('🧭 Starting HSLayers server version', packageJson.version, '...');

0 comments on commit d1ce8a8

Please sign in to comment.