1.0.0 • Published 4 years ago

@fizz.js/node-route v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

@fizz.js/node-route

This is a Route package modulibrary for express.

install

add dependencies into package.json and run yarn install

test

yarn test

coverage

yarn cover

build

yarn build

docs

yarn docs

example

const fs = require('fs')
const path = require('path')
const inflector = require('inflected')
const Route = require('@fizz.js/node-route')

const basename = path.basename(__filename)
const ext = '.js'
fs.readdirSync(__dirname)
  .filter(file => file.indexOf('.') !== 0 && file !== basename && file.slice(-3) === ext)
  .map(file => file.replace(ext, ''))
  .map(file => Route.register(file, require(path.join(__dirname, file))))