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
- Host: GitHub
- URL: https://github.com/ragarwalll/cf-operations
- Owner: ragarwalll
- License: gpl-3.0
- Created: 2023-09-24T13:06:00.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-05-11T23:46:46.000Z (about 1 year ago)
- Last Synced: 2025-09-15T22:23:51.005Z (9 months ago)
- Topics: agarwal, btp, cf, ragarwalll, rahul, sap, therahulagarwal
- Language: TypeScript
- Homepage: https://therahulagarwal.com/cf-operations/
- Size: 59.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
@ragarwal06/cf-operations - SAP BTP SSH & Enviorment Generator Wrapper for NodeJS (with Typescipt Support)
==============================================
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=)