Skip to content

martindale/fabric-http

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@fabric/http

Project Status Build Status Coverage Status GitHub contributors Community

Fabric module for serving the legacy web.

Quick Start

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:

scripts/app.js:

'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.

Advanced: @maki/roller

Maki, making beautiful apps a breeze

Try maki roll examples in this repo for a mind-blowing experience.

About

Fabric module for serving the legacy web.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 49.8%
  • CSS 35.0%
  • Less 14.9%
  • Other 0.3%