标签:添加 依赖 sele col run 项目结构 lse app.js hub
docker run -d -p 4200:4200 crate
yarn init -y
yarn add node-crate
app.js
var crate = require(‘node-crate‘);
crate.connect(‘localhost‘, 4200);
crate.execute("select * from appdemofirst", []).then((res) => {
console.log(‘Success‘, res.json, res.duration, res.rowcount, res.cols, res.rows)
})
{
"name": "node-project",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"node-crate": "^2.0.6"
},
"scripts": {
"s":"node app"
}
}
├── README.md
├── app.js
├── package.json
└── yarn.lock
yarn s
https://www.npmjs.com/package/node-crate
https://github.com/rongfengliang/cratedb-nodejs-demo
标签:添加 依赖 sele col run 项目结构 lse app.js hub
原文地址:https://www.cnblogs.com/rongfengliang/p/9429789.html