1.0.4 • Published 4 years ago

file-based-database-shop v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

file-based-database-shop

Warehouse manager using fs module.

Install

Install with npm.
npm install file-based-database-shop

Example Setup

After installing via npm, simply require the library and begin enjoying🚀

// In your app.js file
const Shop = require('file-based-database-shop')

Usage

After requiring add these line of codes into your project

let keys = process.argv

;(async function () {
    let db = new Shop("warehouse");

    if (keys[2] === "--dep") {
        await db.dep(keys[3], parseInt(keys[4]));
    } else if (keys[2] === "-sell") {
        await db.sell(keys[3], parseInt(keys[4]));
    } else if (keys.length === 2) {
        await db.dash();
    }
})();
What features does our function have?

You can add products, sell products and see stats as table.

  • To add products run this command on your terminal or cmd:
node app.js --dep productName productCount

For example: image

  • To sell products run this command on your terminal or cmd:
node app.js -sell productName productCount

For example: image

  • To see existing products run this command on your terminal or cmd:
node app.js

For example: image

My github profile

GitHub

My telegram blog

Telegram
1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago