node-erest
Easy to build api server depend on express.
Easy to write, easy to test, easy to generate document.
Install
$ npm install erest --save
Use yeoman generator
$ npm install generator-erest -g# Express $ yo erest:express# erest $ yo erest:lei-web
How to use
'use strict'; const API = default; // API info for documentconst INFO = title: 'erest-demo' description: 'Easy to write, easy to test, easy to generate document.' version: host: 'http://127.0.0.1:3000' basePath: '/api'; // API group infoconst GROUPS = Index: '首页'; // Init APIconst apiService = info: INFO groups: GROUPS; apiServiceapi title'Test api' ; const express = ;const app = ;const router = ;app; // bing express routerapiService; app;