Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/baguilar6174/node-calcutator-app

Node console App to create a simple multiplication table
https://github.com/baguilar6174/node-calcutator-app

clean-architecture console-application testing typescript yargs

Last synced: 13 days ago
JSON representation

Node console App to create a simple multiplication table

Awesome Lists containing this project

README

        

# Node Multiplication Console App

This repository contains a basic application that is executed by console, its objective is to create a multiplication table with arguments sent by command console. This repository uses clean architecture principles and unit tests.

## Installation

Clone this repository

```bash
git clone https://github.com/baguilar6174/node-calcutator-app.git
```

Install dependencies

```bash
yarn
```

## Running the app

1. Run `yarn dev` with this command you send:

```bash
npx ts-node ./src/app.ts -b 10 -l 15
```

* You can update params command in `package.json` file or execute command with custom params

```bash
npx ts-node ./src/app.ts -b 10 -l 15 -s -n filename -d destination
```

## My process

### Built with

- Node
- Typescript
- Nodemon
- Yargs
- Jest

### What I learned

- Create console apps
- Console arguments
- Flags and options
- Yargs configuration
- Use Cases & Use Case Testing
- Testing on console commands
- Dynamically change console arguments
- Mocks & Spies
- Testing when errors are expected
- Integration testing
- Testing with self-invoked anonymous asynchronous functions
- Testing with yargs
- Testing with file and directory creation

## Development Features

- Clean Architecture
- Good folder structure
- SOLID

## Improves

- Fix: test with dynamic imports

## Stay in touch

- Website - [www.bryan-aguilar.com](https://www.bryan-aguilar.com/)
- Medium - [baguilar6174](https://baguilar6174.medium.com/)
- LinkeIn - [baguilar6174](https://www.linkedin.com/in/baguilar6174)