Getting Started

Configuration

Configure the application, database, logging, HTTP limits, and sessions.

Beta · v0.2.0Lanjit APIs may change before the stable release. Review the release notes and upgrade guide before updating.

Configuration modules live in config and read environment-specific values through env(). Access loaded values through the config container binding.

Production guidance

Generate a unique APP_KEY, disable APP_DEBUG, enable secure session cookies over HTTPS, and keep credentials outside version control.

Examples

APP_NAME=Lanjit
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost:3333

LOG_LEVEL=debug

DB_CONNECTION=sqlite
# DB_HOST=127.0.0.1
# DB_PORT=3306
# DB_DATABASE=lanjit
# DB_USERNAME=root
# DB_PASSWORD=

SESSION_LIFETIME=120
node artisan key:generate
const appName = app.make('config').get('app.name');
const connection = app.make('config').get('database.default', 'sqlite');
import { env } from '../framework/Support/env.js';

export default {
  max_body_size: Number(env('HTTP_MAX_BODY_SIZE', 1024 * 1024)),
};
SESSION_COOKIE=lanjit_session
SESSION_LIFETIME=120
SESSION_SECURE_COOKIE=true
Edit this page on GitHub

Type to search all documentation.