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

sails-prod-hook-sockets

v0.0.1

Published

Implements socket.io support in blue-prod

Downloads

22

Readme

blue-prod-hook-sockets

Implements Socket.io support in blue-prod.

This is a core hook in the blue-prod framework. You can override or disable it using your .sailsrc file or environment variables. See Concepts > Configuration for more information.

Help

If you have further questions or are having trouble, click here.

What version of Sails is this for?

This hook is for Sails v1.0 and up.

Prior to Sails v1.0, this hook was a dependency of Sails core. But now, it is now installed as a direct dependency of your Sails app.

What is this? What does it do?

This repo contains a hook, one of the building blocks Sails is made out of.

This hook's responsibilities are:

  • When initialized...
    • fire up socket.io server
    • listen for connect / disconnect events
      • listen for get/post/put/delete/patch events
        • create bare-bones request and response contexts, then pass them to the core interpreter in Sails to be routed on the fly.
    • Bind after "shadow" routes...
      • GET /__getcookie
    • Expose on the sails app object:

What version of Socket.io does this hook use?

Click here to check out the semver range for this hook's Socket.io dependency.

For reproducibility, we always pin 3rd party dependencies to a specific version, using a consistent verified version string when possible (see kit).

Bugs   NPM version

To report a bug, click here.

Contributing

NPM

Running the tests

First, clone this repo, cd into it, and install dependencies:

git clone https://github.com/EMSA-TECHNOLOGY/blue-prod-hook-sockets.git
cd blue-prod-hook-sockets
npm install
Run them all

To run all the tests, start a local redis server on port 6380 and then run the tests using mocha:

redis-server --port 6380 --requirepass 'secret'
npm test
Run only certain tests

Alternatively, you can run a particular set of tests with:

node ./node_modules/mocha/bin/mocha -g 'without session'

(this may be useful if you don't want to wait for all the tests to run, or e.g. if you aren't able to install a redis server locally. However please make sure all the tests pass before submitting a PR.)

License

The blue-prod framework is free and open-source under the MIT License.