@tao.js/koa v0.16.2
@tao.js/koa
middleware used to expose a TAO signal network over http using a koa app server
See the website tao.js for more information or the issues associated with this package.
Install
Using npm:
npm install --save @tao.js/koa
or using yarn:
yarn add @tao.js/koa
Importing
The package provides 3 different ways to import based upon how it's being used.
All @tao.js
packages use the following pattern to provide keys in package.json
telling Node and bundlers where to find the packages distributed code:
module
- provides a ES Module version of the package (in thedist
folder)main
- provides a CommonJS version of the package (in thelib
folder)
ES Module
If you are using import
statements to import @tao.js/koa
then package.json
identifies
a module
key to tell Node or your bundler of choice where to find the version packaged as
ES Modules (the dist
folder).
import taoKoa from '@tao.js/koa';
This is the recommended way to import the package and most modern builders & bundlers can handle it
CommonJS
If you are using require
statements and not a bundler that understands ES Modules, the
package.json
identifies the main
key to tell Node or your bundler where to find the version
packaged as a CommonJS module (the lib
folder).
const taoKoa = require('@tao.js/koa').default;
UMD Bundles
Since @tao.js/koa
is only used server-side in node.js, there are no UMD bundles provided
for this package.
All Packages in the @tao.js
family
package | description | docs page |
---|---|---|
npm @tao.js/core | Core Javascript implementation of the TAO ☯ programming paradigm | tao.js.org |
npm @tao.js/utils | Extensions to Core used to build out the Signal Network | tao.js Utilities for Implementers |
npm @tao.js/react | Adapter to use tao.js with React | Usage with React.js |
npm @tao.js/socket.io | socket.io middleware to run tao.js seamlessly on server & client | tao.js for Socket.io |
npm @tao.js/koa | Expose a TAO signal network over http using a koa app server | tao.js for Koa |
npm @tao.js/router | connects url routing with tao.js | URL Handling with @tao.js/router |