To make your apps fit the desired purpose, Typetron offers a way to configure them through configuration files found in the config directory.

export default new AppConfig({
    port: 8000,
    environment: 'development',
    middleware: [],
    providers: [],
    staticAssets: {
        '': ['public']

Getting config

If you need to get some config in one of your classes, controllers or services, you can make use of dependency injection to get it:

import { Controller, Get } from '@Typetron/Router';
import { Inject } from '@Typetron/Container';
import { AppConfig, DatabaseConfig } from '@Typetron/Framework';

export class HomeController {
    appConfig: AppConfig;

    databaseConfig: DatabaseConfig;

    async index() {
        return `App runs on port ${this.appConfig.port}`;

Creating custom configuration files

In progress