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

https://github.com/ragarwalll/cf-operations

CF Operations for Getting Environment for app & starting a SSH tunnel
https://github.com/ragarwalll/cf-operations

agarwal btp cf ragarwalll rahul sap therahulagarwal

Last synced: 5 months ago
JSON representation

CF Operations for Getting Environment for app & starting a SSH tunnel

Awesome Lists containing this project

README

          

@ragarwal06/cf-operations - SAP BTP SSH & Enviorment Generator Wrapper for NodeJS (with Typescipt Support)
==============================================


Version


Total Downloads


License

Table of contents
-------------

* [Install](#install)
* [Getting started](#getting-started)
* [Contact](#contact)

Install
-------

Install from npm:

```bash
npm install @ragarwal06/cf-operations
```

or clone from the [GitHub repository](https://github.com/ragarwal06/cf-operations) to run tests and examples locally:

```bash
git clone https://github.com/ragarwal06/cf-operations.git
cd cf-operations
npm install
```

Getting started
------------

### Loading Environment from SAP BTP
This is a very simple example showing how to use this module in Javascript:

```js
const operations = require("@ragarwal06/cf-operations");
operations
.generateDotEnv({
appName: "appName",
isBGDeployment: true,
})
.then((e) => {
console.log("env loaded");
})
.catch((e) => console.log(e));
```

This is a very simple example showing how to use this module in Typescript:

```ts
import { generateDotEnv } from "@ragarwal06/cf-operations";

generateDotEnv({
appName: "appName",
isBGDeployment: true,
})
.then((e) => {
console.log("env loaded");
})
.catch((e) => console.log(e));
```

### SSH Tunneling from SAP BTP to Local

This is a very simple example showing how to use this module in Javascript:

```ts
const operations = require("@ragarwal06/cf-operations");

operations
.startTunneling({
appName: "appName",
isBGDeployment: true,
outPort: 9094,
serviceName: "serviceName",
urlGenerator: (credentials) => {
// make sure to generate & return the ssh format in
// {url}:{port}
},
})
.then((e) => {
console.log("hi");
});
```
This is a very simple example showing how to use this module in Typescript:

```ts
import { startTunneling } from "@ragarwal06/cf-operations";

startTunneling({
appName: "appName",
isBGDeployment: true,
outPort: 9094,
serviceName: "serviceName",
urlGenerator: (creds) => {
// make sure to generate & return the ssh format in
// {url}:{port}
},
}).then((e) => {
console.log("hi");
});

```

Currently `kafka` & `postgresql-db` url generator is already available. So you can skip sending `urlGenerator` function

Contact
-------

If you face any issue please write to [owner](mailto:agarwal.rahul324@gmail.com) or create a [GitHub issue](https://github.com/ragarwal06/cf-operations/issues/new?assignees=&labels=bug&projects=&template=issue.md&title=)

For feature request please request [here](https://github.com/ragarwal06/cf-operations/issues/new?assignees=&labels=feature&projects=&template=feature.md&title=)