July 2019
Intermediate to advanced
416 pages
10h 6m
English
Again, continuing with the theme of reusing code as much as possible, we are going to use a slightly modified version of the Express Server class we wrote, way back in Chapter 4, The MEAN Stack – Building a Photo Gallery. Again, we will quickly go through the code to re-familiarize ourselves with it. First, let's put the class definition and constructor in place. Our constructor is a slimmed-down version of the constructor from Chapter 4, The MEAN Stack – Building a Photo Gallery:
export abstract class Server { constructor(private port: number = 3000, private app: any = express(), protected routingEngine: RoutingEngine = new RoutingEngine()) {} }}
We also want to add CORS support. While we could make this mandatory, I still ...
Read now
Unlock full access