Skip to content

Instantly share code, notes, and snippets.

View websoftwares's full-sized avatar
🏠
Working from home

websoftwares

🏠
Working from home
  • Luxembourg
View GitHub Profile
@websoftwares
websoftwares / full-http-control.js
Created October 26, 2017 08:50
webtask-full-http-control-test
module.exports = function (context, req, res) {
res.writeHead(200, { 'Content-Type': 'text/html ' })
res.end('<h1>Hello, world!</h1>')
}
@websoftwares
websoftwares / function-with-context.js
Created October 26, 2017 08:43
webtask-function-with-context-model
module.exports = function (context, cb) {
cb(null, { hello_you: context.data.name || 'Anonymous' })
}
@websoftwares
websoftwares / simple-function.js
Created October 26, 2017 08:26
webtask-simple-function-model-test
module.exports = function (cb) {
cb(null, { i_am: 'done ' })
}
@websoftwares
websoftwares / graphql.js
Last active December 27, 2017 11:31
Getting GraphQL on webtask.io running
'use latest'
const express = require('express')
const graphqlHTTP = require('express-graphql')
const { buildSchema } = require('graphql')
const app = express()
const webtask = require('webtask-tools')
const bodyParser = require('body-parser')
const schema = buildSchema(`
type Query {