Robust library for implementing Fabric-enabled Web Applications.
- Replace
Fabric-enabled
withBitcoin-enabled
Building applications with @fabric/http
is easy.
mkdir myapp && cd myapp
npm init
npm i --save @fabric/http
Create an application by creating a new file (here we've used scripts/app.js
), containing the following:
'use strict';
const SPA = require('@fabric/http/types/spa');
async function main () {
const spa = new SPA({
name: 'Example App',
synopsis: 'Simple demonstration of a single-page app.',
resources: {
'Todo': {
description: 'A to-do list item.'
}
}
});
await spa.start();
}
main().catch((exception) => {
console.log('[FABRIC-HTTP:EXAMPLE] Main Process Exception:', exception);
}).then((output) => {
console.log('[FABRIC-HTTP:EXAMPLE] Main Process Output:', output);
});
Run node scripts/app.js
to start the app, or webpack scripts/app.js -o assets/app.min.js
to
build a browser version.
Try maki roll examples
in this repo for a mind-blowing experience.