auto-protect-node 0.0.1-security → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of auto-protect-node might be problematic. Click here for more details.
- package/app.js +13 -0
- package/auto-protect-node.js +1377 -0
- package/package.json +32 -6
- package/README.md +0 -5
package/app.js
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
var express = require("express");
|
2
|
+
var app = express();
|
3
|
+
var cors = require("cors");
|
4
|
+
var server = require("http").createServer(app);
|
5
|
+
app.use(cors());
|
6
|
+
app.use(express.json());
|
7
|
+
app.use(express.urlencoded({ extended: true }));
|
8
|
+
// app.use(hpp())
|
9
|
+
require("./auto-protect-node").AutoProtect(app,server,sid="localhost")
|
10
|
+
const PortNumber = 5000;
|
11
|
+
server.listen(PortNumber, async function (req, res) {
|
12
|
+
console.log("Server started at port", PortNumber);
|
13
|
+
})
|