Skip to content

Commit db9653b

Browse files
first commit adding files and directories
1 parent 6c7ed9a commit db9653b

6 files changed

Lines changed: 873 additions & 0 deletions

File tree

middleware-costum/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
.env

middleware-costum/app.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import express from "express";
2+
3+
const app = express();
4+

middleware-costum/middleware/jsonArrayMiddleware.js

Whitespace-only changes.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
function usernameMiddleware(req, res, next) {
2+
const username = req.header("X-Username");
3+
4+
req.username = username || null;
5+
6+
next();
7+
}

0 commit comments

Comments
 (0)