https://github.com/endreot/bamazon
Bamazon Node.js command line store
https://github.com/endreot/bamazon
inquirerjs nodejs sql typescript
Last synced: about 1 month ago
JSON representation
Bamazon Node.js command line store
- Host: GitHub
- URL: https://github.com/endreot/bamazon
- Owner: EndreoT
- License: mit
- Created: 2019-05-09T01:29:40.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-19T17:09:48.000Z (about 7 years ago)
- Last Synced: 2025-06-03T20:09:52.800Z (about 1 year ago)
- Topics: inquirerjs, nodejs, sql, typescript
- Language: TypeScript
- Homepage:
- Size: 718 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bamazon
## Description
Node.js command line interface simulating a "Amazon" like store.
## Motivation
This project can be a starting point for a product store backend with CRUD operations implemented.
## Results
There are three levels of interaction with the Bamazon store: customers, managers, and supervisors, all of which use the command line. Bamazon uses SQL to communicate to a MySQL database, which stores a products table and a departments table. The node.js mysql package allows communication between node and the database.
## Available actions
* Customers choose which product and how much to purchase, and view a purchase receipt.
* Managers view all products, low stock products, increase inventory for existing produts, and add new products.
* Supervisors view department information and add new departments.
## Installation
You will need a MySQL database. One option is https://dev.mysql.com/downloads/
```
git clone
cd path/to/Word-Guess-Game
(You may have to run 'npx gts init')
npm install
```
Next, add and execute the schema SQL files (MySQL Workbench is handy for this task), then do the same with the seeds SQL files to create a database for sandbox use.
## Compile typescript to javascript
```
npm run compile
```
## Run
```
cd build/src
node
```
Where filename is from one of the three following files in build/src:
```
bamazonCustomer.js
bamazonManager.js
supervisor.js
```
## Examples
### bamazonCustomer.js

### bamazonManager.js

### supervisor.js
