initial commit

This commit is contained in:
Paul Trowbridge 2020-01-31 00:16:29 -05:00
commit faae9db46a
4 changed files with 1246 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/node_modules
*.db3

16
index.js Normal file
View File

@ -0,0 +1,16 @@
var s = require('sqlite3');
var db = new s.Database('osm.db3');
db.serialize(function() {
db.run("CREATE TABLE IF NOT EXISTS sales(cust text, part text, value numeric)");
});
db.serialize(function() {
db.run("INSERT INTO sales VALUES ('Agri AFC','nsr001g',.50)");
});
db.each("SELECT cust, part FROM sales", function(err, row) {
console.log(row.cust + ": " + row.part);
});
db.close;

1213
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

15
package.json Normal file
View File

@ -0,0 +1,15 @@
{
"name": "sqlite_test",
"version": "1.0.0",
"description": "test",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.17.1",
"sqlite3": "^4.1.1"
}
}