July 2019
Intermediate to advanced
416 pages
10h 6m
English
We now have everything we need to create our actual services. Here, we will look at the Addresses service, understanding that the other services will follow the same pattern. Since we already have the data models, data access code, and routing in place, all we have to do is create our actual AddressesServer class. The AddressesServer class is as simple as this:
export class AddressesServer extends Server { protected AddRouting(router: Router): void { this.routingEngine.Add(GetAddressRouting, router); this.routingEngine.Add(SaveAddressRouting, router); }}
We start the server like this:
new AddressesServer() .WithCorsSupport() .WithDatabase().Start();
The code is as easy as that. We are following a principle called ...
Read now
Unlock full access