UNPKG

arma3-life-db

Version:

Connects to your life server's database on arma 3 to pull or update information.

36 lines (30 loc) 713 B
interface ConfigObject { IP: string, Port: string, Database: string, Username: string, Password: string } export let Database: ConfigObject = { IP: '', Port: '', Database: '', Username: '', Password: '' }; export function returnPromise(callback: Function) { return new Promise((resolve, reject) => { resolve(callback()) }).catch((error) => { throw error }) } export function Config(Config: ConfigObject):Promise<any> { return returnPromise(() => { Database = Config "Success" }) } import {Get, Update} from './Query' export const Query_Get = Get export const Query_Update = Update