npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nexus-client-http

v0.0.1-alpha2

Published

HTTP client for nexus-server

Readme

Nexus client for node.js

Standard - JavaScript Style Guide

Node.js HTTP client for Nexus, a simple HTTP file storage server.

The client provides a streams-compatible interface. It's a thin-veiled semantic wrapper that makes it as simple to work with remote files as it is with local files.

Nexus is currently an alpha version. Use at your own risk.

Important: The version you see here MAY NOT be the one currently published on npm! To check the latest published version, look at the package on npm.

Documentation is sparse at the moment, I will write some more later. In the mean time take a look at the source code if you're interested.

Install

npm install nexus-client-http

Examples

These trivial examples are really as simple as they look!

Getting a new client

const Client = require('nexus-client-http')

const client = new Client({
  // These options are given to http.request
  hostname: 'localhost', // this is the default host name
  port: 6607 // this is the default port
})

Read example

Loads a remote resource and pipes it to a local file. Also see example-read.js.

const fs = require('fs')

const remote = client.createReadStream('/resource.json')
const local = fs.createWriteStream('./resource.json')

local.on('end', () => {
  console.log('read ended!')
})

// Pipe the remote stream to the local stream
remote.pipe(local)

Write example

Writes the contents of a local file to a remote resource. Also see example-write.js.

const fs = require('fs')

const local = fs.createReadStream('./resource.json')
const remote = client.createWriteStream('/resource.json')

remote.on('end', () => {
  console.log('write ended!')
})

// Pipe the local stream to the remote stream
local.stream(remote)

Enabling SSL

By setting options.secure to true and providing the appropriate keys and/or certificates in the options object, HTTPS will be enabled and your connection will be secure.

Note that this client uses http(s).request, so all options that can be provided there will be valid.

const client = new Client({
  secure: true,
  key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
  cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
})

Standard - JavaScript Style Guide

License

Copyright 2017 Michiel van der Velde.

This software is licensed under the MIT License.