sudzy-db
TypeScript icon, indicating that this package has built-in type declarations

0.5.28 • Public • Published

Sudzy Database

This module allows to access the data of the Sudzy POS.

Build Status Coverage Status

Contributin to sudzy-db

npm run generate to generate the documentation

npm run test to run tests

npm run cover to run the coverage

Compile typescript: tsc

Using this module in other modules

  • To use the sudzy-db classes in a TypeScript file -
let db = new PouchDB("default");
const customers = new Customers(db, Customer);
customers.insert({ mobile : "6465490561" }).then((c) => {
    console.log(c.mobile)
}).catch(_.noop);

Configure mySQL

  1. One time: in MySQL workbench click file - run script etl/tables.sql - refresh all to create tables
  2. One time. Change config.numMocks if you want and uncomment deleteMocks if you want: tsc etl/mocks.ts
  3. One time: node etl/mocks.js
  4. tsc etl/script.ts
  5. node etl/script.js

Installing CouchDB

see http://docs.couchdb.org/en/master/install/unix.html

apt-get install apt-transport-https ca-certificates
echo "deb https://apache.bintray.com/couchdb-deb stretch main"  | sudo tee -a /etc/apt/sources.list
curl -L https://couchdb.apache.org/repo/bintray-pubkey.asc | sudo apt-key add -
sudo apt-get update && sudo apt-get install couchdb

select 0.0.0.0 (or update in /opt/couchdb/etc/local.ini the binding ip)

Readme

Keywords

Package Sidebar

Install

npm i sudzy-db

Weekly Downloads

0

Version

0.5.28

License

MIT

Unpacked Size

441 kB

Total Files

219

Last publish

Collaborators

  • ganoro