🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

node-http-context

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-http-context - npm Package Compare versions

Comparing version
1.0.0
to
1.0.1
+1
-1
index.js

@@ -7,3 +7,3 @@ const Util = require('./Util');

*/
static Initilize(app) {
static Initialize(app) {
if (app) {

@@ -10,0 +10,0 @@ app.use(Util.middleware);

{
"name": "node-http-context",
"version": "1.0.0",
"version": "1.0.1",
"description": "Get HttpContext from anywhere",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -10,7 +10,7 @@ # Node Http Context

const express = require('express');
const httpContext = require('node-http-context');
const HttpContext = require('node-http-context');
const app = express();
// Initialize Httpcontext middleware service
HttpContext.Initilize(app);
HttpContext.Initialize(app);
// After initialize the httpcontext we can get httpcontext anywhere

@@ -22,16 +22,16 @@ ```

``` js
const httpContext = require('node-http-context');
const HttpContext = require('node-http-context');
//Node express request object from HttpContext
httpContext.Request;
HttpContext.Request;
//Node express response object from HttpContext
httpContext.Response.send(HTML/STRING);
httpContext.Response.json({JSON_Object});
HttpContext.Response.send(HTML/STRING);
HttpContext.Response.json({JSON_Object});
//Node express Next object from HttpContext
httpContext.Next();
HttpContext.Next();
//Node express session object from HttpContext
httpContext.Session;
HttpContext.Session;
```

@@ -38,0 +38,0 @@