1.0.1 • Published 4 years ago
huafua v1.0.1
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!