GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — lorem ipsum it is · norman465/CodeEngine@cf7953a

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • helloworld-samples
    • function-codebundle-nodejs
      • README.md
      • main.js
      • package.json
    • function-codebundle-python
      • README.md
      • __main__.py
      • requirements.txt
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎helloworld-samples/function-codebundle-nodejs/README.md‎

Copy file name to clipboardExpand all lines: helloworld-samples/function-codebundle-nodejs/README.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ A sample node.js function that uses a external npm module.
55
Deploy the function straight to Code Engine by running thr following command from this directory
66

77
```bash
8-
ibmcloud ce fn create -n nodejoke -runtime nodejs-18 --build-source .
8+
ibmcloud ce fn create -n lorem-node -runtime nodejs-18 --build-source .
99
```
1010

1111
For more information follow th official docs -> [Including modules for a Node.js Function](https://cloud.ibm.com/docs/codeengine?topic=codeengine-fun-create-repo#function-nodejs-dep-repo)
Collapse file

‎helloworld-samples/function-codebundle-nodejs/main.js‎

Copy file name to clipboard
+7-8Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
function main(args) {
2-
const oneLinerJoke = require('one-liner-joke');
3-
let getRandomJoke = oneLinerJoke.getRandomJoke();
2+
const LoremIpsum = require("lorem-ipsum").LoremIpsum;
3+
const lorem = new LoremIpsum();
44

5-
return {
6-
headers: { 'Content-Type': 'text/plain;charset=utf-8' },
7-
body: getRandomJoke
8-
}
5+
return {
6+
headers: { "Content-Type": "text/plain;charset=utf-8" },
7+
body: lorem.generateWords(10),
8+
};
99
}
1010

11-
12-
module.exports.main = main;
11+
module.exports.main = main;
Collapse file

‎helloworld-samples/function-codebundle-nodejs/package.json‎

Copy file name to clipboardExpand all lines: helloworld-samples/function-codebundle-nodejs/package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"version": "1.0.0",
44
"main": "main.js",
55
"dependencies" : {
6-
"one-liner-joke" : "1.2.2"
6+
"lorem-ipsum" : "2.0.8"
77
}
88
}
Collapse file

‎helloworld-samples/function-codebundle-python/README.md‎

Copy file name to clipboardExpand all lines: helloworld-samples/function-codebundle-python/README.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ A sample Python function that uses a external pip module.
55
Deploy the function straight to Code Engine by running the following command from this directory
66

77
```bash
8-
ibmcloud ce fn create -n pyjokes -runtime python-3.11 --build-source .
8+
ibmcloud ce fn create -n lorem-python -runtime python-3.11 --build-source .
99
```
1010

1111
For more information follow th official docs -> [Including modules for a Python Function](https://cloud.ibm.com/docs/codeengine?topic=codeengine-fun-create-repo#function-python-dep-repo)
Collapse file

‎helloworld-samples/function-codebundle-python/__main__.py‎

Copy file name to clipboard
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
import pyjokes
1+
from lorem_text import lorem
2+
23

34
def main(params):
5+
words = 10
6+
47
return {
58
"headers": {
69
"Content-Type": "text/plain;charset=utf-8",
710
},
8-
"body": pyjokes.get_joke(),
11+
"body": lorem.words(words),
912
}
Collapse file

‎helloworld-samples/function-codebundle-python/requirements.txt‎

Copy file name to clipboard
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pyjokes==0.6.0
1+
lorem-text

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.