8000 GitHub - darkfadr/express-route-mapper
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

darkfadr/express-route-mapper

Repository files navigation

This repo contains a library using Rollup.

Installing

$ yarn add express-route-mapper

Example

import Router from 'express-route-mapper';

const router = new Router('./contoller_dir');
router.map({
  '/user': { get: temp },
  'user/:id': [
  	'GET UserController.view',
  	'POST UserController.create',
  	'PUT UserController.update',
  	'Delete UserController.delete'
  ],
  '/session': {get: temp,},
  '/session/:id': {
    get: temp,
    post: temp,
    put: temp
  },
  '/sessions': 'POST SessionController.create',
});

Build

Clone this repository and install its dependencies:

npm install

npm run build builds the library to dist, generating three files:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0