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

superagent-node-plugin

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

superagent-node-plugin

Allow you to custom port while calling AJAX with superagent

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
2
100%
Maintainers
1
Weekly downloads
 
Created
Source

superagent-node-plugin

Allow you to custom port while calling AJAX with superagent

Installation

$ npm install --save superagent-node

How it work

Custom port call

import request from 'superagent'
import superagentNodePlugin from 'superagent-node-plugin'

request. 
  get('/api/v1/users').
  use(superagentNodePlugin(3000)).
  end((err, { body }) => {
    // ...
  })

or using custom port from process.env.PORT

request. 
  get('/api/v1/users'). 
  use(superagentNodePlugin()). 
  end((err, { body }) => {
    // ...
  })
PORT=3000 npm index.js

Test

Install package dependencies and run test command

npm run test

Credit

FakeRainBrigand

http://stackoverflow.com/questions/26463924/getting-rid-of-localhost3000-urls-for-reactasync

Keywords

superagent

FAQs

Package last updated on 08 Jun 2016

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