Skip to content

Commit

Permalink
trivial express based REST API using typescript. example only
Browse files Browse the repository at this point in the history
  • Loading branch information
jburger authored Jul 2, 2016
1 parent 700b58f commit 2e9a877
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions typescript_express/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import express = require("express");
import customerRouter = require("./routes/customerRouter");
import requestLogger = require("./middleware/requestLogger");

export class GetPackApi {
export class WebApi {
/**
* @param app - express application
* @param port - port to listen on
Expand Down Expand Up @@ -96,10 +96,10 @@ export = requestLogger;
_Program entry point_
```javascript
import express = require('express');
import { GetPackApi } from './application';
import { WebApi } from './application';

let port = 5001; //or from a configuration file
let gp = new GetPackApi(express(), port);
gp.run();
let api = new WebApi(express(), port);
api.run();
console.info(`listening on ${port}`);
```

0 comments on commit 2e9a877

Please sign in to comment.