INNER CODE UNIT · TypeScript

getVersionFile

MauriceNino/dashdot · apps/server/src/index.ts:64

  const getVersionFile = () => {
    try {
      return JSON.parse(
        readFileSync(path.join(__dirname, '../../../version.json'), 'utf-8'),
      );
    } catch (_e) {
      console.warn(
        'Version file not found. This is normal on from-source builds.',
      );
      return {};
    }
  };

  const versionFile = getVersionFile();
  router.get('/config', (_, res) => {
    res.send({
      config: {
        ...CONFIG,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…