Adding NodeJS version 12 env (#1683)

Co-authored-by: Rahul Bhati <rjbhati009@gmail.com>
This commit is contained in:
Vishal
2020-08-28 10:24:22 +05:30
committed by GitHub
co-authored by Rahul Bhati
parent 22f385b809
commit 1755d3a017
12 changed files with 166 additions and 1 deletions
@@ -0,0 +1,6 @@
module.exports = async function (context) {
return {
status: 200,
body: "hello, world!\n",
};
};
@@ -0,0 +1,15 @@
var url = require("url");
module.exports = async function (context) {
console.log(context.request.url);
var url_parts = url.parse(context.request.url, true);
var query = url_parts.query;
console.log("query user : ", query.user);
return {
status: 200,
body: "hello " + query.user + "!",
};
};
@@ -0,0 +1,8 @@
module.exports = async function (context) {
var splitStringArray = context.request.split(" ");
return {
status: 200,
body: splitStringArray.length,
};
};
@@ -0,0 +1,8 @@
const momentpackage = require("moment");
module.exports = async function (context) {
return {
status: 200,
body: "Hello " + momentpackage().format(),
};
};
@@ -0,0 +1,9 @@
{
"name": "fission-nodejs-runtime",
"engines": {
"node": ">=7.6.0"
},
"dependencies": {
"moment": "*"
}
}