Webtask is a serverless framework using Node.js as the primary development platform. It supports a deep security model as well as the ability to use a CRON-based scheduling system. More details may be found at webtask.io.
Questions tagged [webtask]
12 questions
2
votes
1 answer
Webtask + Sendgrid = compilation failure?
Running this via webtask.io :
var sgMail = require("@sendgrid/mail");
module.exports = function(context, req, res) {
res.writeHead(200, { 'Content-Type': 'text/html '});
res.end('
Hello, world!
'); }; Results in this response: { "code":…
Adam Lombard
- 324
- 2
- 7
1
vote
1 answer
How to make a pug template render inside of Webtask.io Node/Express serverless app?
I'm trying to render a very simple Pug template from a route in my Webtask.io serverless Node app. Here's my attempt:
'use latest';
import express from 'express';
import pug from 'pug'
const app = express();
app.set('view engine',…

Tom Schreck
- 5,177
- 12
- 68
- 122
1
vote
1 answer
Stripe with Webtask
I've been working for days on implementing Stripe Checkout into my static site. My static site is generated by React. There is a tutorial for setting up Stripe Checkout using React, however I also need to move the backend function to webtask.
Here…

Chris Porter
- 143
- 1
- 13
1
vote
1 answer
How to get all documents of a collection with mongodb find() using webtask.io and mlab
I have a collection named "posts" in a mongodb at mlab.com and I am trying to access all of the documents in this collection with db.collection('posts').find(). Below is my code for my webtask I've created, which I named mongodb_find:
var…

Ezra Free
- 808
- 11
- 21
1
vote
2 answers
Webtask.io backend cannot find module
I'm learning serverless backend and I'm trying webtask.io to deploy a simple backend to get the prices from cryptocurrency exchanges. My server is working fine when I deploy it locally, but when I try to deploy it in webtask.io I'm getting this…

claudiomatiasrg
- 578
- 4
- 11
- 31
0
votes
1 answer
How to use sessions in a webtask?
There's no persistent memory in webtasks, so passport's default MemoryStore won't work. I do know webtask offers persistant storage so perhaps I could use that somehow?

Gunar Gessner
- 2,331
- 23
- 23
0
votes
1 answer
How to use res.redirect in a webtask?
I'm exporting an express app called eggman with webtask-tools.
My res.redirect('/walrus')ses don't work.
The url for my app is ….sandbox.auth0-extend.com/eggman/walrus, which means / will point to ….sandbox.auth0-extend.com/walrus instead of…

Gunar Gessner
- 2,331
- 23
- 23
0
votes
1 answer
How to get and set JSON data with Webtask storage?
Trying to figure out how to save mouse coordinates to Webtask storage after reading this post:
https://blog.codepen.io/2018/05/04/say-you-need-to-get-set-some-json-data-from-a-pen/
I want to create a heatmap that will write mouse coordinates to…
0
votes
2 answers
Using Webtask.io with Stripe for React-Static
I am building a small website using React-Static. Site is all built, but I need to integrate basic donation functionality. I have a few questions that have me stumped. Following the guide here by Thomasz Jancuk I've run into a few hurdles.
1.)…

Chris Porter
- 143
- 1
- 13
0
votes
2 answers
Compile multiple node.js files into one
I am writing code for webtask.io and it seems as if I can only upload one file to run. I would like to organize my code into multiple files with different modules but then have them be compiled into one for upload. I have tried gulp with…

Zachary Russell Heineman
- 511
- 2
- 17
0
votes
0 answers
Axios not working inside API protected route
I have a Node JS functions created in webtask with serverless framework. The API routes are protected and to use it I need to pass a firebase token that I send from client side. That part is working fine, the token gets verified and then I can…

claudiomatiasrg
- 578
- 4
- 11
- 31
-1
votes
1 answer
Cannot stop nodejs function
I have a nodejs serverless backend which takes an interger and then execute some code. My problem is that if I send a string, I still get a 200 code response with null data.
To stop the function and send an error message I'm trying to check if the…

claudiomatiasrg
- 578
- 4
- 11
- 31