Skip to content

Commit

Permalink
Merge 5767e84 into 9668076
Browse files Browse the repository at this point in the history
  • Loading branch information
medved-nsk committed Apr 23, 2019
2 parents 9668076 + 5767e84 commit e011251
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ pending plots are opened in a unique tab and all the data is requested, the
server shuts down. If you fire another plot the server starts again provides
your plot and shuts down automatically.

Another port can be provided via PORT environment variable.

## Contributing

Contributions in all forms are welcome.
Expand Down Expand Up @@ -192,4 +194,4 @@ the [website](https://felixlemke.com).

## Dependencies

- [opn](https://www.npmjs.com/package/opn)
- [opn](https://www.npmjs.com/package/opn)
6 changes: 3 additions & 3 deletions src/plot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { IPlot, IPlotsContainer } from './models/index';
import { Layout, Plot } from './models/index';
import { Server } from './server';


const server = new Server(8080);
const port = Number(process.env.PORT) || 8080;
const server = new Server(port);

export let plots: IPlot[] = [];
export const plotContainer: IPlotsContainer = {};
Expand Down Expand Up @@ -62,4 +62,4 @@ function validate(data: Plot[], layout?: Layout) {
throw new TypeError('Layout must be an object');
}
}
}
}
2 changes: 1 addition & 1 deletion test/server.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import opn from 'opn';
import request from 'request';
import { Server } from '../src/server';

const port = 8080;
const port = Number(process.env.PORT) || 8080;
const validData = {
opened: false,
pending: false,
Expand Down

0 comments on commit e011251

Please sign in to comment.