typescript-mock-server 1.0.9 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typescript-mock-server",
3
- "version": "1.0.9",
3
+ "version": "1.10.0",
4
4
  "description": "Simple mock server that can be used in front end development. Instead of creating json files you can just publish TypeScript objects as json",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -30,13 +30,13 @@ export class TypescriptMockServerImpl implements TypescriptMockServer{
30
30
 
31
31
  public async start() {
32
32
  this.log.info(`basePath: ${this.basePath}`);
33
- await this.readRoutes(this.basePath).catch(error => this.log.error(error));
34
33
  const port = this.commandLine.getCommand(Command.PORT) || 3000;
35
34
  const corsSetting: CorsOptions = {
36
35
  origin: this.commandLine.getCommand(Command.CORS) || '*'
37
36
  };
38
37
 
39
38
  this.app.use(cors(corsSetting))
39
+ await this.readRoutes(this.basePath).catch(error => this.log.error(error));
40
40
  this.app.listen(port, () => {
41
41
  this.log.info(`App is listening on port ${port}!`);
42
42
  });