Skip to content

Commit

Permalink
feat: create the main export file. exposes an instanc() method that w…
Browse files Browse the repository at this point in the history
…hen called returns an instance

usage would be like  import RServer from 'R-Server'; let app = RServer.instance(configPath?);
app.listen(port?); app.get('/hello-world', (req, res) => res.end('Hello World'));
  • Loading branch information
teclone committed Jul 23, 2018
1 parent dcfde45 commit ce3f44d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import RServerApp from './modules/RServerApp.js';
export default {

/**
* returns an app instance
*/
instance(configPath) {
return new RServerApp(configPath);
}
};

0 comments on commit ce3f44d

Please sign in to comment.