pulse-express.js 1.0.2 → 1.0.4

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/Functions.js +8 -13
  2. package/package.json +1 -1
package/Functions.js CHANGED
@@ -1,20 +1,15 @@
1
- var functions = {}
1
+ var functions = {};
2
2
 
3
3
  function pulse() {
4
- return functions
4
+ return functions;
5
5
  }
6
6
 
7
- functions.CreateServer = function(callback) {
7
+ functions.CreateServer = function() {
8
8
  const http = require('http');
9
-
10
- // We create the server and pass the req/res straight to the user
11
- const server = http.createServer((req, res) => {
12
- if (callback) {
13
- callback(req, res); // The user now controls res.end() here
14
- }
15
- });
16
-
17
- return server;
9
+
10
+ // This creates the server object but DOES NOT start it.
11
+ // It will sit idle until .listen() is called elsewhere.
12
+ return http.createServer();
18
13
  };
19
14
 
20
- module.exports = pulse;
15
+ module.exports = pulse;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pulse-express.js",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "A lightweight request timer for Express apps Credits to express",
5
5
  "main": "Functions.js",
6
6
  "keywords": [