New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

wt-cli

Package Overview
Dependencies
Maintainers
3
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wt-cli

Webtask Command Line Interface

  • 2.0.0-beta.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
42
decreased by-25%
Maintainers
3
Weekly downloads
 
Created
Source

Webtask CLI: all you need is code

Command line tool for using webtasks to create microservices in seconds.

Setup

$ npm i -g wt-cli
$ wt init

Usage

Create a webtask

Write webtask code to the hello-world.js file:

module.exports = function (cb) {
  cb(null, 'Hello webtasks!');
}
wt create hello-world.js

and call it...

curl https://webtask.it.auth0.com/api/run/{yours}/hello-world

Create a webtask (from a public URL)

wt create https://raw.githubusercontent.com/auth0/wt-cli/master/sample-webtasks/html-response.js \
          --name html-response-url

Create a webtask with a secret

wt create https://raw.githubusercontent.com/auth0/wt-cli/master/sample-webtasks/mongodb.js \
          --name mongo \
          --secret MONGO_URL=mongodb://webtask:supersecret@ds047592.mongolab.com:47592/webtask-examples

This is a real mongodb URL (powered by mongolab), no guarrantee that it will work :)

Create a webtask that integrates with express.js

wt create https://raw.githubusercontent.com/auth0/wt-cli/master/sample-webtasks/express.js \
          --name express \
          --no-parse --no-merge

Log streaming

wt logs

Cron a webtask (long running)

wt cron schedule -n mongocron \
                 -s MONGO_URL=mongodb://webtask:supersecret@ds047592.mongolab.com:47592/webtask-examples \
                 "*/10 * * * *" \
                 https://raw.githubusercontent.com/auth0/wt-cli/master/sample-webtasks/mongodb.js

This cron will insert a document in a mongo collection every 10 minutes

Get cron history

wt cron history mongogron

Get all scheduled webtasks

wt cron ls

Issue Reporting

If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.

Author

Auth0

License

This project is licensed under the MIT license. See the LICENSE file for more info.

FAQs

Package last updated on 22 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc