Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/baguilar6174/node-calcutator-app
- Owner: baguilar6174
- Created: 2023-12-13T22:39:17.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-03-27T22:34:03.000Z (8 months ago)
- Last Synced: 2024-03-27T23:28:11.963Z (8 months ago)
- Topics: clean-architecture, console-application, testing, typescript, yargs
- Language: TypeScript
- Homepage:
- Size: 85 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)