Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

YAKjs logo

GitHub version npm GitHub license

A local server to stub complex WebSocket back-ends.

Documentation

Visit yakjs.com 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

Versions

3.5.0

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 => {
        event.app.get('/', 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.

About

A local server to stub complex WebSocket backends.

Resources

License

Packages

No packages published

Languages

You can’t perform that action at this time.