Owl.CreateService(config: ServiceConfig): RegisteredService
Server OnlyInstantiates and registers a novel Service on the server infrastructure. Throws an estimation error if invoked post-init.
Parameters
config* | Configuration dictionary defining 'Name', optional array of explicit 'Dependencies', inward/outward 'Middleware' mappings, lifecycle hooks and an exposed 'Client' interface table. |
Returns
RegisteredServiceThe compiled service instance augmented with active lifecycle state controllers and internal utility objects (_trove, _comm).
Related Types
LUA
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Owl = require(ReplicatedStorage.OwlKnit.Owl)
local InventoryService = Owl.CreateService({
Name = "InventoryService",
Dependencies = { "DataService" },
Client = {},
})
function InventoryService:OwlInit()
self.DataService = self.GetService("DataService")
end
function InventoryService:OwlStart()
print("InventoryService active.")
end
return InventoryService