express-sequelize-traffic 0.1.0 → 0.2.0
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.
- package/README.md +10 -1
- package/dist/index.cjs +880 -0
- package/dist/index.js +844 -0
- package/package.json +13 -6
- package/examples/express-app.js +0 -106
- package/src/dashboard.js +0 -132
- package/src/index.js +0 -67
- package/src/middleware.js +0 -111
- package/src/models/TrafficLog.js +0 -83
- package/src/realtime.js +0 -71
- package/src/routes/analyticsRoutes.js +0 -83
- package/src/services/analyticsService.js +0 -286
- package/src/utils/dashboardAuth.js +0 -71
- package/src/utils/routeMatcher.js +0 -53
- package/src/utils/safeAsync.js +0 -13
- /package/{src → dist}/dashboard-public/assets/index-CaWHQ-tp.js +0 -0
- /package/{src → dist}/dashboard-public/assets/index-iT93XJlh.css +0 -0
- /package/{src → dist}/dashboard-public/index.html +0 -0
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ If you are working on this repository directly:
|
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
29
|
npm install
|
|
30
|
-
npm run build
|
|
30
|
+
npm run build
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
## Sequelize Setup
|
|
@@ -83,6 +83,15 @@ app.use("/traffic-dashboard", traffic.dashboard);
|
|
|
83
83
|
server.listen(3000);
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
+
CommonJS applications can use the published `require(...)` entry:
|
|
87
|
+
|
|
88
|
+
```js
|
|
89
|
+
const express = require("express");
|
|
90
|
+
const http = require("node:http");
|
|
91
|
+
const { Sequelize } = require("sequelize");
|
|
92
|
+
const { createTrafficTracker } = require("express-sequelize-traffic");
|
|
93
|
+
```
|
|
94
|
+
|
|
86
95
|
## Dashboard Usage
|
|
87
96
|
|
|
88
97
|
The dashboard is optional. Set `dashboard.enabled` to `true`, build the frontend assets, attach realtime support, and mount the provided router.
|