screen size not supported

Application configuration JSON example

Last updated 2026-05-20

When to use this

Use this as a starting point for an app-config schema — environment, services, feature flags, logging, and rate limits. Drop it into a config loader test, a schema-validation tutorial, or a deploy-time bootstrap.

Example JSON

A realistic config file for a small Node service.
{
  "app": {
    "name": "jsonexamples-api",
    "version": "1.4.2",
    "environment": "production"
  },
  "server": {
    "host": "0.0.0.0",
    "port": 8291,
    "gracefulShutdownSeconds": 10
  },
  "database": {
    "url": "postgres://example:5432/jsonexamples",
    "poolMin": 2,
    "poolMax": 10,
    "sslMode": "require"
  },
  "cache": {
    "driver": "redis",
    "host": "cache.internal",
    "port": 6379,
    "ttlSeconds": 300
  },
  "rateLimits": {
    "perIpPerMinute": 600,
    "perUserPerMinute": 1200,
    "burst": 200
  },
  "featureFlags": {
    "newOnboarding": true,
    "betaSearch": false,
    "darkMode": "auto"
  },
  "logging": {
    "level": "info",
    "format": "json",
    "sampleRate": 0.1
  },
  "integrations": {
    "search": {
      "provider": "meilisearch",
      "host": "search.internal"
    },
    "mailer": {
      "provider": "postmark"
    }
  }
}

Request examples

const fs = require('fs');
const config = JSON.parse(fs.readFileSync('./config.json', 'utf8'));
console.log(config.app.environment);

Common variations

Local dev override

Slim version that overlays the production config.

{
  "server": {
    "port": 3000
  },
  "logging": {
    "level": "debug"
  },
  "featureFlags": {
    "betaSearch": true
  }
}
Feature flags only

Useful when feature flags are served by a separate service.

{
  "newOnboarding": true,
  "betaSearch": false,
  "darkMode": "auto",
  "exportPdf": false
}

Convert this JSON

Generated starting points for TypeScript, JSON Schema, and Zod. Refine before shipping to production.

export interface ConfigurationFile {
  "app": {
    "name": string;
    "version": string;
    "environment": string;
  };
  "server": {
    "host": string;
    "port": number;
    "gracefulShutdownSeconds": number;
  };
  "database": {
    "url": string;
    "poolMin": number;
    "poolMax": number;
    "sslMode": string;
  };
  "cache": {
    "driver": string;
    "host": string;
    "port": number;
    "ttlSeconds": number;
  };
  "rateLimits": {
    "perIpPerMinute": number;
    "perUserPerMinute": number;
    "burst": number;
  };
  "featureFlags": {
    "newOnboarding": boolean;
    "betaSearch": boolean;
    "darkMode": string;
  };
  "logging": {
    "level": string;
    "format": string;
    "sampleRate": number;
  };
  "integrations": {
    "search": {
      "provider": string;
      "host": string;
    };
    "mailer": {
      "provider": string;
    };
  };
}

Note. For a downloadable file you can drop straight into a test suite, see the medium and large sample JSON downloads.