https://github.com/blackiq/cli-wrapper
The simple nodejs http wrapper you can use in your terminal or app.
https://github.com/blackiq/cli-wrapper
api cli-wrapper express http-wrapper nodejs request
Last synced: 7 months ago
JSON representation
The simple nodejs http wrapper you can use in your terminal or app.
- Host: GitHub
- URL: https://github.com/blackiq/cli-wrapper
- Owner: BlackIQ
- License: mit
- Created: 2024-03-31T18:47:16.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-19T10:39:42.000Z (over 1 year ago)
- Last Synced: 2025-05-01T04:36:06.970Z (9 months ago)
- Topics: api, cli-wrapper, express, http-wrapper, nodejs, request
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@blackiq/cli-wrapper
- Size: 46.9 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- License: LICENSE
Awesome Lists containing this project
README
# CLI Wrapper
**CLI Wrapper** is command line wrapper you can install to use in your terminal. You can even use it in your apps.
In this instructure you will learn about how to use this package in your apps.
## Table of content
- [Installation](#installation)
- [Run]($run)
- [Development](#development)
## Installation
How to install **CLI Wrapper**? To install this package, use **NPM**.
```shell
$ npm i -g @blackiq/cli-wrapper
```
> We use `-g` to install the package **globally**.
## Run
Ok, to run the wrapper, just enter this command in your terminal:
```bash
$ cli-wrapper
```
You are now running it in port 3000. If you want to use your own port, use `--port`.
```bash
$ cli-wrapper --port 8000
```
All done!
---
## Development
If you want to develop the package, it is so simple. just follow steps below.
- Clone the project
- Install dependencies by running `$ npm install`
- Start changing!
- Link package
- Test
> Before you start: **Remember the base or code are stored in `lib/wrapper.js`**. You need to edit there.
### Cloning the project
To clone the project, you need to have git installed. Ok, now clone it same as command below.
```shell
$ git clone https://gitlab.com/BlackIQ/cli-wrapper
```
### installing dependencies
Next, install what package uses with `npm i` or `npm install`.
```shell
$ npm i
```
### Changing
To change package or anything, your need a testing environment to use linked package. Just follow steps.
#### Link package
We asoume you are in `lib` directory. Right. You can open a **tmux** or in another terminal to cd in `test` directory.
In `lib` directory enter link command:
```shell
$ npm link
```
So, in other terminal, or other tmux part, link your development package to your `test` directory. If you are in the `test` directory ok, if not, just say `cd test` and enter the linking command:
```shell
$ npm link cli-wrapper
```
Linking step is done.
#### Test
Your test app is linked. Change anything in package and test it in `test` directory.