1.0.0 • Published 7 years ago

fs-routing v1.0.0

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

fs-routing

express.js で filesystem でルーティング定義できるアクセサリ

パスとメソッドを指定することでファイルシステムを用いたルーティング定義ができます。

Installation

$ npm install --save multer

Usage

Usage Example:

const path = require('path');
const express = require('express');
const fsRouter = require('fs-router');

var app = express();

app.use(fsRouter('get', path.join(__dirname, './get/'));

fsRouter(method, path)

method: getpost などを指定します。 path: ルーティング定義のファイルシステムのパスを指定します。path.join() 関数などを使用して絶対パスを使用してください。

Example

https://github.com/shioleap/post

1.0.0

7 years ago