@epic-js/express-profiler 0.1.0 → 0.1.1

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/README.md +5 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -10,18 +10,19 @@ npm install express-profiler
10
10
  ## Usage
11
11
  ```js
12
12
  const express = require('express');
13
- const expressProfiler = require('express-profiler');
14
- const { wrapAsync } = require('express-profiler/wrappers');
13
+ const apiProfiler = require('@epic-js/express-profiler');
15
14
 
16
15
  const app = express();
17
16
  app.use(expressProfiler());
18
17
 
18
+ app.listen(3000);
19
+ ```
20
+ ## After finding the slow routes dig deeper by using the wrapAsync
21
+ ```js
19
22
  app.get('/users', async (req, res) => {
20
23
  const users = await wrapAsync(async () => [{ id: 1, name: 'Alice' }], 'DB', req)();
21
24
  res.send(users);
22
25
  });
23
-
24
- app.listen(3000);
25
26
  ```
26
27
 
27
28
  ## CLI Usage
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epic-js/express-profiler",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Lightweight Express API profiler with route/middleware/async timing",
5
5
  "main": "index.js",
6
6
  "bin": {