redweb 0.0.1 → 0.0.2

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 +4 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -30,10 +30,12 @@ const DEFAULT_OPTIONS = {
30
30
  * @param {{port: Number, bind: String, public: Array<String>, services: []}} options
31
31
  * @return WebExpress
32
32
  */
33
- export function WebExpress(options = DEFAULT_OPTIONS) {
33
+ function WebExpress(options = DEFAULT_OPTIONS) {
34
34
  const app = express();
35
35
  app.use(bodyParser.json());
36
36
  options.public.forEach((public_path) => app.use(express.static(path.join(__dirname, public_path))));
37
37
  app.listen(options.port, listenCallback ? listenCallback : () => console.log('WebExpress listening on port ' + options.port));
38
38
  return this;
39
- }
39
+ }
40
+
41
+ module.exports = { WebExpress }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redweb",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "A way to quickly set up an express server",
5
5
  "main": "index.js",
6
6
  "scripts": {