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 🙏

© 2024 – Pkg Stats / Ryan Hefner

dpd-js-sdk

v0.0.7

Published

Use the deployd javascript sdk as a node module

Downloads

14

Readme

dpd-js-sdk

Use the deployd javascript sdk (dpd.js) anywhere you can run npm modules. It's not just for the browser anymore! Use convenient dpd.js syntax to query deployd APIs using nodejs.

Install via npm

$ npm install dpd-js-sdk

Setup rootURL & baseURL (optional)

var dpd = require('dpd-js-sdk')('http://www.yourDeploydDomain.com', '/api' );

Usage

var dpd = require('dpd-js-sdk')();
dpd.todos = dpd("/todos"); // you have to manually add your resources like so

dpd.todos.get(function(function(results, error) {
  //do something
});

Additional documentation for the dpd.js sdk can be found here: http://docs.deployd.com/docs/collections/reference/dpd-js.md#s-Dpd.js

How the sausage gets made:

Most of this code comes straight out of https://github.com/deployd/deployd/blob/master/clib/dpd.js

I have added a dependency on bluebird (for promises) and request (for sanity). Ajax requests made in the original clib/dpd.js are just replaced using promisified request.

I have also removed socket.io client stuff in here for now, since I think it would take some work to get it working...and because this is enough to suit my current need. (I am using this module as part of some express middleware to get data from remote deployd API).

As such, the Realtime API features (documented here: http://docs.deployd.com/docs/collections/reference/dpd-js.md#s-Realtime%20API) do not work.

Disclaimer

This module is untested, unauthorized, unlicenced, and unsupported. Use at your own discretion.