Takaro - v0.4.9
    Preparing search index...

    Module @takaro/gameserver

    @takaro/config

    An opinionated config manager based on node-convict

    import { Config, IBaseConfig } from '@takaro/config';

    interface IExampleConfig extends IBaseConfig {
    test: string;
    }

    // This is a schema from convict
    const exampleSchema = {
    test: {
    doc: 'Test value',
    format: String,
    default: 'test',
    env: 'TAKARO_TEST'
    }
    };

    const config = new Config<IExampleConfig>([exampleSchema]);

    // ---

    config.load({ test: 1 });
    // Error! 'test' should be a string
    config.validate();

    // ---

    config.load({ test: 'Hello world' });
    config.get('test') // 'Hello world'

    Enumerations

    EntityType
    GAME_SERVER_TYPE

    Classes

    BanDTO
    CommandOutput
    Generic
    GenericConnectionInfo
    GenericEmitter
    IEntityDTO
    IItemDTO
    ILocationDTO
    IMessageOptsDTO
    IPlayerReferenceDTO
    MapInfoDTO
    Rust
    RustConnectionInfo
    SdtdConnectionInfo
    SevenDaysToDie
    TakaroConnector
    TakaroEmitter
    TestReachabilityOutputDTO

    Interfaces

    IGameServer

    Type Aliases

    GameServerActions

    Variables

    GAME_SERVER_ACTIONS
    genericJsonSchema
    rustJsonSchema
    sdtdJsonSchema

    Functions

    getGame