0.3.0 • Published 6 years ago

routux v0.3.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Routux

A fast and productive router to improve the UX (User eXperience) of any frontend application. Inspired by the router of Express JS (amongst others), Routux supports:

  • middlewares,
  • Regex pattern,
  • named route,
  • route reverse,
  • asynchronicity,
  • error handler,
  • ... and others useful features.

Getting started

Install from NPM

Terminal:

npm install routux --save

JS:

var routux = require('routux');
var router = new routux.Router();

router.use('/', function(req, next) {
  // Your logic here
});

router.run();

Or install from source file

Download dist/routux.min.js file and add in your HTML file:

<script src="./path-of-your-js-files/routux.min.js"></script>

Then routux is in the global scope:

var router = new routux.Router();

router.use('/', function(req, next) {
  // Your logic here
});

router.run();

Use CDN

<script src="https://cdn.rawgit.com/Nicolab/routux/master/dist/routux.min.js"></script>

You can change master by a specific version. Example for v0.3.0:

<script src="https://cdn.rawgit.com/Nicolab/routux/v0.3.0/dist/routux.min.js"></script>

Note: please, use the latest version

Usage

See the doc and the examples directory.

Development of Routux core

Routux is developped in ES6 (EcmaScript6) in src directory and compiled to ES5 in the dist/routux.min.js file.

Build a minified distributable, in the terminal:

gulp dist.build

Develop with the automatic rebuilds (the distributable and the unit tests):

gulp testing

Unit tests

Routux is unit tested with Unit.js, Mocha and Webdriver.io.

TODO: There are still things to test.

LICENSE

MIT (c) 2016, Nicolas Tallefourtane.

Author

Routux is designed and built with love by

Nicolas Tallefourtane - Nicolab.net
Nicolas Talle
Make a donation via Paypal
0.3.0

6 years ago

0.2.8

8 years ago

0.2.7

8 years ago

0.2.6

8 years ago

0.2.5

9 years ago

0.2.4

9 years ago

0.2.3

9 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago