huafua

1.0.1 • Public • Published

HUAFUA

Introduction

  • middleware for express
  • sqlite based tool
  • crud included
  • callback required

How to use

  • Install

        npm install huafua
  • Configuration

    //引用中间件包
    var middleware=require("huafua");
    var app=express();
    app.use(middleware({
        dbname:"./data.sqlite" //sqlite文件路径
    }));
    app.get("/",function(req,res){
        res.find("student",function(err,data){
            if(err){
                res.json(e);
            }else{
                res.json(data);
            }
        })
    });
  • Run and test

    start the server

    node app.js

    and open http://localhost:8080

End

hope it helps!

Package Sidebar

Install

npm i huafua

Weekly Downloads

18

Version

1.0.1

License

ISC

Unpacked Size

45.9 kB

Total Files

11

Last publish

Collaborators

  • huafua