file-based-database-shop

1.0.4 • Public • Published

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

Package Sidebar

Install

npm i file-based-database-shop

Weekly Downloads

0

Version

1.0.4

License

MIT

Unpacked Size

8.29 kB

Total Files

6

Last publish

Collaborators

  • mabrur-h