Skip to content

jacobangel/praxis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Praxis

A method for writing web-workers using a Promise-based API.

// WorkerAPI
const Praxis = require('./praxis');
const worker = require('worker!./worker.js');
const getThing = () => {
  return new Praxis(worker)
    .invoke('random')
    .then((resp) => {
      console.log('the response', resp);
    }).catch((resp) => {
      console.log('the error', resp);
    });
};

module.exports = { getThing };

Build

Build is done using webpack.

npm install   # install all modules
npm run build # build pertinent files
npm run test  # run mocha tests
npm run serve # run webpack-dev-server on 8080

About

praxis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published