随笔分类 - node
摘要:使用nvm切换node版本 卸载本地node cmd 输入where node 到node安装删除整个路径 下载nvm 下载链接 安装多版本node
阅读全文
摘要:sql.js库的使用 安装 npm install sql.js 使用 const fs = require('fs'); const initSqlJs = require('sql.js/dist/sql-wasm.js'); const path = require('path'); const filebuffer = fs.readFileSync(path.resolve(__dirname, '../ignoreDir/filename.sqlite')); initSqlJs().then(function (SQL) { // Load the db // filebuffer可以不传,传了就是基于这个sqlite文件创建内存 const db = new SQL.Database(filebuffer); db.run("CREATE TABLE users (id, name, phone, address);"); db.run( `INSERT INTO users (id, name, phone, address) VALUES (23, 'John Do
阅读全文

浙公网安备 33010602011771号