setService

 setService: (serviceName: keyof typeof acts, service: Acts | string)

set acts to service or ser addreess to service


Example
    
      const coreApp = lesan();
      const locationPure = {
        name: string(),
        population: number(),
        abb: string(),
      };
      const cities = coreApp.odm.newModel(
        "city",
        locationPure,
        {
          country: {
            schemaName: "country",
            type: "single",
            optional: false,
            relatedRelations: {
              cities: {
                type: "multiple",
                limit: 5,
                sort: {
                  field: "_id",
                  order: "asc",
                },
              },
            },
          },
        },
      );

const setMainService = coreApp.acts.setService("main", "main");

Return Of Example:
    
      "main" 
    
  

Parameters

  
    serviceName: keyof typeof acts,
    service: Acts | string,
    acts: Services