Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including yakjs with all npm packages installed. Try it out:

var yakjs = require("yakjs")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

yakjs v3.6.1

YAKjs - a local server to stub WebSocket backends.

YAKjs logo

GitHub version npm GitHub license

A local server to stub complex WebSocket back-ends.


Visit for full documentation.

Getting started

YAKjs requires nodejs.

Install via npm

npm install yakjs -g

Start YAKjs

> yakjs

This will start YAKjs using default port 8790.

Open the YAKjs User Interface

Open the YAKjs user interface at http://localhost:8790



InstanceStarted event

Adds a new InstanceStarted event with access to the express app. Register your routes or own middleware for an instance.

When running an instance on port 9020 with the example plugin, then a GET request can be sent to http://localhost:9020 Keep in mind that an instance can use multiple plugins, use your routes accordingly to avoid conflicts.

 * @constructor
 * @struct
 * @see {!PluginWorker}
function HelloWorldPlugin() {
     * @param {!InstanceStartedEvent} event
    this.onInstanceStarted = event => {'/', function(req, res) {
            res.send('Hello world!');

 * @type {!Plugin}
module.exports = {
    name: 'hello-world',
    description: 'Say hello to the world.',
    createWorker: () => new HelloWorldPlugin()

Removes the WSS/HTTPS experiment

Removes the YAKjs server configuration to enable WSS/HTTPS with a (unsecure) test certificate.


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free