New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

jinx

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jinx

A stripped down web application framework for node

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

jinx

A stripped down web framework for node

Meant as a drop in replacement for express without view rendering, named routing, or error handling.

var app = require('jinx');
app.set('message', 'Hello Bro!');

app.get(/^/$/, function(req, res) {
  res.end(app.set('message'));
});

app.post(/^/echo$/, function(req, res) {
  res.send(req.body);
});

app.get('/^middle$/, function(req, res, next) {
  console.log('Malcolm is here');
  next();
}, function(req, res) {
  res.send('Middleware works');
});

app.listen(3000);

TLDR;

  • Routes are always treated as regular expressions.
  • req.body support for application/json and application/x-www-form-urlencoded POSTs.
  • Method override can be used to send PUT/DELETE.
  • req.header for accessing headers.
  • req.param for accessing parameters.
  • req.send detects payload type and encodes accordingly.
  • Access logs with timing information.
  • app.set(key, value)

FAQs

Package last updated on 29 Jan 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts