Weaveworld, full-scale JavaScript framework for web applications


Keywords
WebDevelopment, Weaveworld
Licenses
AML/QPL-1.0/MIT-feh
Install
npm install weaveworld@0.14.190421

Documentation

Weaveworld

Using Weaveworld with Node.js and Express.

License for weaveworld Node.js module: MIT.
License for Weaveworld: see 'public/LICENSE' file or here.

Direct access for w.min.js and w.css.

<script src="w.min.js"></script>
<link href="w.css" rel="stylesheet"/>

Example:

const app=require('express')(), bodyParser=require('body-parser');
const weaveworld=require('weaveworld')

app.listen(3000);
app.use(bodyParser.urlencoded({extended: false}));
app.use(bodyParser.json());

// Optional: publishing files from a folder, too
weaveworld.dir=__dirname+'/public';

// Optional: handling REST API requests
app.route('/tasks')
    .get(function(req,res){
        res.send([{name:'Task1'},{name:'Task2'}]);
    });
// ...    

// Optional: handling ONCE-style server calls
weaveworld.op('hello').then(o=>({message:'Hello '+(o.name||'World')+'!'}));
// ...

// Mandatory: set routing
app.all('/*',weaveworld.route);

Publishing files from a directory.

E.g.,

weaveworld.dir=__dirname+'/public';