UNPKG

@starbase/services

Version:
1 lines 637 B
"use strict";function Services(settings={}){const{servicesURL:servicesURL,dbName:dbName,appName:appName,starbase:starbase}=settings;let servicesType=servicesURL;appName&&"string"==typeof appName&&(servicesType=servicesURL+"/apps/"+appName);const Database=starbase.Database,Channels=starbase.Channels,Client=starbase.Client,db=(starbase.Auth,starbase.Profiles,starbase.Admin,Channels(Database(dbName))),auth=starbase.Auth(Client(servicesType+"/auth"),db);return{db:db,auth:auth,profiles:starbase.Profiles(starbase.Client(servicesType+"/profiles"),auth),admin:starbase.Admin(starbase.Client(servicesType+"/admin"),auth),starbase:starbase}}