Skip to content

Commit 5ffb3f2

Browse files
author
Shreyas Nayak
committed
Readme file changes
1 parent 9b6c7b7 commit 5ffb3f2

3 files changed

Lines changed: 6 additions & 14 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,25 @@ You can set up NodeJS-FAAS using Docker or Containerd.
1313
Pull using Docker:
1414

1515
```
16-
docker pull shreyasnayak21/nodejs-faas:latest
16+
docker pull shreyasnayak21/nodejs-faas:1.1.0
1717
```
1818

1919
Run using Docker:
2020

2121
```
22-
docker run -p 9256:9256 nodejs-faas:latest
22+
docker run -p 9256:9256 shreyasnayak21/nodejs-faas:1.1.0
2323
```
2424

2525
Pull using Containerd:
2626

2727
```
28-
nerdctl pull shreyasnayak21/nodejs-faas:latest
28+
nerdctl pull shreyasnayak21/nodejs-faas:1.1.0
2929
```
3030

3131
Run using Containerd:
3232

3333
```
34-
nerdctl run -p 9256:9256 nodejs-faas:latest
34+
nerdctl run -p 9256:9256 shreyasnayak21/nodejs-faas:1.1.0
3535
```
3636

3737
Alternatively, you can use `pm2` to run the source code:
@@ -48,7 +48,7 @@ pm2 start index.mjs --name NodeJS-FAAS
4848
```
4949

5050
# How to use?
51-
Currently, we provide an interface over [HTTP API](openapi.yml). You can create a lambda function or upload code formatted in an `mjs` file to the instance, and you can execute the function using the API. Additionally, there are plans to add NATS.io or Pub/Sub to trigger a function.
51+
Currently, we provide an interface over [HTTP API](openapi.json). You can create a lambda function or upload code formatted in an `mjs` file to the instance, and you can execute the function using the API. Additionally, there are plans to add NATS.io or Pub/Sub to trigger a function.
5252

5353
# Example Code
5454

index.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ function generateAlphanumericName(length = 10) {
2323
return result;
2424
}
2525

26-
2726
const upload = multer({ dest: 'uploads/' });
2827

2928
const app = express();
@@ -170,8 +169,7 @@ app.post('/function/execute/:function_id', async (req, res) => {
170169
});
171170
});
172171

173-
174172
const PORT = process.env.PORT || 9256;
175173
app.listen(PORT, () => {
176174
console.log(`Server is running on http://localhost:${PORT}`);
177-
});
175+
});

openapi.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@
55
"description": "This project aims to achieve something similar to Function as a Service (FaaS) without the overhead of Docker or Kubernetes, with extremely low infrastructure requirements.",
66
"version": "1.0.0"
77
},
8-
"servers": [
9-
{
10-
"url": "http://localhost:9256",
11-
"description": "Local"
12-
}
13-
],
148
"paths": {
159
"/server/health": {
1610
"get": {

0 commit comments

Comments
 (0)