Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stevendborrelli/function-node
A Crossplane Function build with Nodejs and Typescript
https://github.com/stevendborrelli/function-node
crossplane infrastructure-as-code
Last synced: 17 days ago
JSON representation
A Crossplane Function build with Nodejs and Typescript
- Host: GitHub
- URL: https://github.com/stevendborrelli/function-node
- Owner: stevendborrelli
- Created: 2024-11-04T18:30:09.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-11-08T01:40:30.000Z (3 months ago)
- Last Synced: 2024-11-16T08:32:50.658Z (3 months ago)
- Topics: crossplane, infrastructure-as-code
- Language: TypeScript
- Homepage:
- Size: 70.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# function-sdk-node
This is an experimental Crossplane function written in Typescript.
## Running the server
First compile the server:
```shell
tsc
```Next run the function locally:
```shell
node main.js -d --insecure
```In another terminal run the example manifest:
```shell
cd examples/extra_resources
./render.sh
```## Files
- [main.ts](main.ts): sets up the environment and runs the server
- [runtime.ts](runtime.ts): sets up the gRPC server and TLS credentials
- [function.ts](function.ts): implements the function logic
- [request.ts](request.ts): fetch data from the request
- [response.ts](response.ts): sets response fields## Components
- [grpc-js](https://github.com/grpc/grpc-node)
- [nice-grpc](https://github.com/deeplay-io/nice-grpc)## Debugging
To check if the endpoint is running:
```shell
grpcurl -proto proto/v1/run_function.proto -vv -plaintext localhost:9443 "apiextensions.fn.proto.v1.FunctionRunnerService/RunFunction"
```