{"id":20281880,"url":"https://github.com/fahamutech/bfast-functions","last_synced_at":"2025-12-04T12:01:29.666Z","repository":{"id":40352024,"uuid":"201877213","full_name":"fahamutech/bfast-functions","owner":"fahamutech","description":"Cloud function  node run-time for BFast::Cloud platform","archived":false,"fork":false,"pushed_at":"2023-06-20T09:17:37.000Z","size":1002,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-14T07:34:28.286Z","etag":null,"topics":["bfastfaas","cloudfunction","faas","function","serveless"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fahamutech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-12T07:10:20.000Z","updated_at":"2022-02-16T16:56:03.000Z","dependencies_parsed_at":"2025-01-14T07:34:19.972Z","dependency_job_id":"ddc8f5c7-cbdf-4e00-92f4-ed72e8278e25","html_url":"https://github.com/fahamutech/bfast-functions","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fahamutech%2Fbfast-functions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fahamutech%2Fbfast-functions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fahamutech%2Fbfast-functions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fahamutech%2Fbfast-functions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fahamutech","download_url":"https://codeload.github.com/fahamutech/bfast-functions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241774380,"owners_count":20018258,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bfastfaas","cloudfunction","faas","function","serveless"],"created_at":"2024-11-14T14:07:24.666Z","updated_at":"2025-12-04T12:01:29.656Z","avatar_url":"https://github.com/fahamutech.png","language":"JavaScript","readme":"# BFast Function\n\n[![npm version](https://badge.fury.io/js/bfast-function.svg)](https://badge.fury.io/js/bfast-function)\n[![Build Status](https://travis-ci.org/bfast-cloud/bfast-function.svg?branch=master)](https://travis-ci.org/bfast-cloud/bfast-function)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Code Quality](https://api.codacy.com/project/badge/Grade/e0b0c8d1e1b44d7e8a9b0e0e1b0e0e1b)](https://www.codacy.com/gh/bfast-cloud/bfast-function/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=bfast-cloud/bfast-function\u0026amp;utm_campaign=Badge_Grade)\n\n![BFast Function Banner](https://imgur.com/eJ5w43G.png)\n\n**A serverless function engine for Node.js, built on top of Express.js and Socket.IO.**\n\nBFast Function provides a powerful and flexible way to build and deploy serverless functions. It's designed to be easy to use, with a simple and intuitive API.\n\n## Features\n\n*   **Easy to use:** A simple and intuitive API for creating and deploying serverless functions.\n*   **Flexible:** Supports both HTTP and Socket.IO functions.\n*   **Scalable:** Built on top of Express.js and Socket.IO, which are known for their scalability.\n*   **Extensible:** Can be easily extended with custom middleware and plugins.\n*   **Open-source:** BFast Function is open-source and available on GitHub.\n\n## Getting Started\n\nThere are several ways to get started with BFast Function:\n\n**1. From npm:**\n\nThe easiest way to get started is to install BFast Function from npm:\n\n```bash\nnpm install bfast-function\n```\n\n**2. From Git:**\n\nYou can also clone the BFast Function repository from GitHub:\n\n```bash\ngit clone https://github.com/bfast-cloud/bfast-function.git\n```\n\nThen, install the dependencies:\n\n```bash\ncd bfast-function\nnpm install\n```\n\n**3. From a tarball:**\n\nYou can also download a tarball of the BFast Function repository from the [releases page](https://github.com/bfast-cloud/bfast-function/releases).\n\nThen, extract the tarball and install the dependencies:\n\n```bash\ntar -xvf bfast-function-*.tar.gz\ncd bfast-function-*\nnpm install\n```\n\n## Usage\n\n1.  **Create a functions folder:**\n\n    ```bash\n    mkdir functions\n    ```\n\n2.  **Create a function file (e.g., `example.js`):**\n\n    ```javascript\n    const bfast = require('bfast');\n\n    exports.myHttpFunction = bfast.functions().onHttpRequest('/hello', (request, response) =\u003e {\n        response.status(200).send('Hello, World!');\n    });\n\n    exports.mySocketFunction = bfast.functions().onSocketIO('echo', (request, response) =\u003e {\n        response.emit('echo', request.body);\n    });\n    ```\n\n3.  **Start the BFast Function engine:**\n\n    Create an `index.mjs` file in your root workspace and start the Faas server:\n\n    ```javascript\n    import {start} from 'bfast-function';\n\n    start({\n        port: '3000',\n        functionsConfig: {\n            functionsDirPath: './functions',\n        }\n    }).catch(console.log);\n    ```\n\n    Then, start the server:\n\n    ```bash\n    node index.mjs\n    ```\n\n## Docker\n\nYou can also run the BFast Function engine in a Docker container.\n\n**1. Build the Docker image:**\n\n```bash\ndocker build -t bfast-function .\n```\n\n**2. Run the Docker container:**\n\n```bash\ndocker run -p 3000:3000 bfast-function\n```\n\nThis will start the BFast Function engine and expose it on port 3000.\n\n\nYou can also mount a local functions folder to the container:\n\n```bash\ndocker run -p 3000:3000 -v $(pwd)/functions:/app/functions bfast-function\n```\n\nThis will mount the `functions` folder in your current working directory to the `/app/functions` folder in the container.\n\n## Configuration\n\nThe `bfast.json` file is a JSON file that contains configurations for the BFast Function engine.\n\n```json\n{\n  \"ignore\": [\"**/node_modules/**\"]\n}\n```\n\n| Key      | Type    | Description                               |\n| -------- | ------- | ----------------------------------------- |\n| `ignore` | `Array` | An array of glob patterns to ignore when loading functions. |\n\n## API Reference\n\nFor a full list of available options and APIs, please see the [API Reference](./src/models/options.mjs).\n\n## Contributing\n\nWe welcome contributions to BFast Function! If you have an idea for a new feature or have found a bug, please open an issue on our [GitHub repository](https://github.com/bfast-cloud/bfast-function/issues).\n\n## License\n\nBFast Function is licensed under the [MIT License](./LICENSE).","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffahamutech%2Fbfast-functions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffahamutech%2Fbfast-functions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffahamutech%2Fbfast-functions/lists"}