Mandarine.Properties
import type { Mandarine } from "https://raw.githubusercontent.com/mandarineorg/mandarinets/master/main-core/Mandarine.ns.ts";
const { Properties } = Mandarine;
Structure of Mandarine Properties. Mandarine uses these properties to determine how it should work Custom Properties must extend Mandarine.Properties
interface Properties {
[prop: string]: any;
mandarine: {
}server: {
host?: string;
port: number;
responseType?: MandarineMVC.MediaTypes;
responseTimeHeader?: boolean;
enableSessions?: boolean;
enableCors?: boolean;
https?: {
certFile: string;
keyFile: string;
}; cache?: {
} & any; enabled: boolean;
defaultExpiration: number;
expirationInterval: number;
}; resources: {
staticRegExpPattern?: string;
staticFolder?: string;
staticIndex?: string;
cors?: MandarineMVC.CorsMiddlewareOption;
} & any; templateEngine: {
path: string;
} & any; dataSource?: {
dialect: Mandarine.ORM.Dialect.Dialects;
data: {
} & any; host: string;
port?: number;
username: string;
password: string;
database: string;
poolSize?: number;
} & any; authentication?: {
expiration?: number;
cookie?: CookieConfig;
}; sessions: {
touch: boolean;
expiration: number;
expirationInterval: number;
}; security?: {
cookiesSignKeys: Array<string>;
}; services?: {
mongodb?: {
}; connectionURL: string;
}; microservices?: {
} & any;[transporter: string]: Microlemon.ConnectionData | any;
automaticHealthCheck?: boolean;
automaticHealthCheckInterval?: number;
}; §Properties
§
mandarine: {
[src]server: {
host?: string;
port: number;
responseType?: MandarineMVC.MediaTypes;
responseTimeHeader?: boolean;
enableSessions?: boolean;
enableCors?: boolean;
https?: {
certFile: string;
keyFile: string;
}; cache?: {
} & any; enabled: boolean;
defaultExpiration: number;
expirationInterval: number;
}; resources: {
staticRegExpPattern?: string;
staticFolder?: string;
staticIndex?: string;
cors?: MandarineMVC.CorsMiddlewareOption;
} & any; templateEngine: {
path: string;
} & any; dataSource?: {
dialect: Mandarine.ORM.Dialect.Dialects;
data: {
} & any; host: string;
port?: number;
username: string;
password: string;
database: string;
poolSize?: number;
} & any; authentication?: {
expiration?: number;
cookie?: CookieConfig;
}; sessions: {
touch: boolean;
expiration: number;
expirationInterval: number;
}; security?: {
cookiesSignKeys: Array<string>;
}; services?: {
mongodb?: {
}; connectionURL: string;
}; microservices?: {
} & any[transporter: string]: Microlemon.ConnectionData | any;
automaticHealthCheck?: boolean;
automaticHealthCheckInterval?: number;
};