|
2 | 2 |
|
3 | 3 | Reimplementation of MetaCall FaaS platform written in TypeScript. This project requires MetaCall installed in order to run it. For more information about installation: https://github.com/metacall/install
|
4 | 4 |
|
5 |
| -### Development: |
| 5 | +### Development |
| 6 | + |
6 | 7 | ```sh
|
7 | 8 | npm install
|
8 | 9 | npm start
|
9 | 10 | ```
|
10 | 11 |
|
11 |
| -### About Project : |
| 12 | +### About Project |
12 | 13 |
|
13 |
| -MetaCall organization has its own cloud platform known as [MetaCall Hub](https://metacall.io/), a production-ready and high-performance FaaS/Cloud platform where you can deploy services, web apps, and lambdas in seconds. However, the ```Real``` version of MetaCall FaaS is commercialized and requires a plan to deploy your polyglot applications, which can be found [Here](https://metacall.io/pricing/). |
| 14 | +MetaCall organization has its own cloud platform known as [MetaCall Hub](https://metacall.io/), a production-ready and high-performance FaaS/Cloud platform where you can deploy services, web apps, and lambdas in seconds. However, the `Real` version of MetaCall FaaS is commercialized and requires a plan to deploy your polyglot applications, which can be found [Here](https://metacall.io/pricing/). |
14 | 15 |
|
15 |
| -When referring to the ```Real``` version of MetaCall FaaS, it should be noted that this refers to the commercialized FaaS cloud service, whereas ```Local``` refers to the mimic version. |
| 16 | +When referring to the `Real` version of MetaCall FaaS, it should be noted that this refers to the commercialized FaaS cloud service, whereas `Local` refers to the mimic version. |
16 | 17 |
|
17 |
| -Soon, we realized that many contributors joining the community needed an paid account on the ```Real FaaS``` for testing their polyglot applications. To remove this barrier, we proposed a project that would mimic the ```Real FaaS```. |
| 18 | +Soon, we realized that many contributors joining the community needed an paid account on the `Real FaaS` for testing their polyglot applications. To remove this barrier, we proposed a project that would mimic the `Real FaaS`. |
18 | 19 |
|
19 | 20 | With this project, developers can now use it to deploy and test their polyglot applications (built using [MetaCall Core](https://github.com/metacall/core)), web apps, and lambdas. The process is simple:
|
20 | 21 |
|
21 |
| -- Step 1 : Spin up the "Local FaaS" by running the following command: |
| 22 | +- Step 1 : Spin up the "Local FaaS" by running the following command: |
22 | 23 |
|
23 | 24 | ```sh
|
24 | 25 | cd faas
|
25 | 26 | npm start
|
26 | 27 | ```
|
27 | 28 |
|
28 |
| -- Step 2 : Install the [metacall-deploy](https://www.npmjs.com/package/@metacall/deploy) NPM package, and wire the ```--dev``` flag with the ```metacall-deploy``` command in your application directory using the following command: |
| 29 | +- Step 2 : Install the [metacall-deploy](https://www.npmjs.com/package/@metacall/deploy) NPM package, and wire the `--dev` flag with the `metacall-deploy` command in your application directory using the following command: |
29 | 30 |
|
30 | 31 | ```sh
|
31 | 32 | cd move-to-application-directory
|
32 | 33 | metacall-deploy --dev
|
33 | 34 | ```
|
34 | 35 |
|
35 |
| -### Things that need to be implemented: |
| 36 | +### Things that need to be implemented |
36 | 37 |
|
37 |
| -- In order to mimic the "Real FaaS", we need to create all the API endpoints that the "Real FaaS" supports, which can be found listed [Here](https://github.com/metacall/protocol/blob/master/src/protocol.ts). |
| 38 | +- In order to mimic the "Real FaaS", we need to create all the API endpoints that the "Real FaaS" supports, which can be found listed [Here](https://github.com/metacall/protocol/blob/master/src/protocol.ts). |
38 | 39 |
|
39 | 40 | ### Important Note
|
40 | 41 |
|
41 |
| -- This project is still under development and there is one extra thing you need to install before running this project and its [MetaCall Core](https://github.com/metacall/core/blob/develop/docs/README.md#41-installation). |
| 42 | +- This project is still under development and there is one extra thing you need to install before running this project and its [MetaCall Core](https://github.com/metacall/core/blob/develop/docs/README.md#41-installation). |
| 43 | + |
| 44 | +- This project is developed using [MetaCall Core] itself in order to provide polyglot support, we are using its [Node Port](https://github.com/metacall/core/tree/develop/source/ports/node_port) of this library to use all the functions and methods `MetaCall Core C API` provides. |
| 45 | + |
| 46 | +- Also, [Here](https://github.com/metacall/faas/blob/master/types/metacall.d.ts) are all the functions of `MetaCall Core` we are using. |
42 | 47 |
|
43 |
| -- This project is developed using [MetaCall Core] itself in order to provide polyglot support, we are using its [Node Port](https://github.com/metacall/core/tree/develop/source/ports/node_port) of this library to use all the functions and methods ```MetaCall Core C API``` provides. |
| 48 | +### Testing |
44 | 49 |
|
45 |
| -- Also, [Here](https://github.com/metacall/faas/blob/master/types/metacall.d.ts) are all the functions of ```MetaCall Core``` we are using. |
| 50 | +This will run a test, and if the `docker compose up test` command exits with exit code 0, it will mean that the test has passed. |
| 51 | +If you want to see the output of the FaaS, run `docker compose up` instead. But when running this, the command won't terminate once the test finishes and the FaaS will keep running. You will need to press `Ctrl+C` in order to close it. |
46 | 52 |
|
| 53 | +```sh |
| 54 | +docker compose build |
| 55 | +docker compose up test |
| 56 | +docker compose down |
| 57 | +``` |
0 commit comments