redweb 0.0.5 → 0.0.7

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.
Files changed (2) hide show
  1. package/index.js +3 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -32,7 +32,8 @@ const METHODS = {'POST': 'post', 'GET': 'get'}
32
32
  * @param {{port: Number, bind: String, publicPaths: Array<String>, services: Array<{serviceName: String, method: String, function: Function}>}} options
33
33
  * @return RedWeb
34
34
  */
35
- function RedWeb(options = DEFAULT_OPTIONS) {
35
+ function RedWeb(options) {
36
+ options = {...DEFAULT_OPTIONS, ...options};
36
37
  const app = express();
37
38
  const { publicPaths, port, listenCallback, services } = options;
38
39
  app.use(bodyParser.json());
@@ -42,4 +43,4 @@ function RedWeb(options = DEFAULT_OPTIONS) {
42
43
  return this;
43
44
  }
44
45
 
45
- module.exports = { RedWeb, METHODS }
46
+ module.exports = { RedWeb, METHODS, DEFAULT_OPTIONS }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redweb",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "description": "A way to quickly set up an express server",
5
5
  "main": "index.js",
6
6
  "scripts": {