# github.com
https://github.com/a7medkamel/taskmill-help/blob/master/intro/helloworld.js
# becomes github.run
curl https://github.run/a7medkamel/taskmill-help/blob/master/intro/helloworld.js
# ~~~~~~~~~~
Public repositories are runnable by anyone.
Your script is an express endpoint. The function's signature is (req, req, next)
. All data posted or streamed to the script is available on your req object. Same goes for query
parameters.
We provide built in services that you can make use of. Such services include Email, SMS, and Automated Phone Calls.
You can send emails directly from our servers.
You can send sms directly from our servers.
Each repository gets a 16mb MongoDB
You can schedule your scripts to automaticaly run using our cron infrastructure.
Add a .crontab
file to the root of your repository.
The .crontab
file in https://github.com/a7medkamel/taskmill-help/blob/master/.crontab will run the helloworld.js script every minute.
The cron format is standard, but is limited to curl
commands.
*/1 * * * * curl 'https://github.run/a7medkamel/taskmill-help/blob/master/helloworld.js'
Each script can define a usage manual as a comment block. The manual is used to describe variouse aspects of the script's execution.
/*
@title Hello World!
@input
{
"content-type" : "text/plain",
"example" : "Hello from TaskMill"
}
*/
You can define input and output contrainsts as well as additional metadata.
attribute | usage |
---|---|
@title | Human readable title |
@description | Detailed description of this endpoint |
@readme | URL to a readme |
@input | JSON with input content-type and example |
↳ content-type | text/plain or application/json ... |
↳ example | "Example input to assist new users" |
@output | JSON object |
↳ content-type | text/plain or image/png ... |
@pragma | Add hints to script execution and response |
↳ editor append | @pragma editor replace instructs editor plugin to replace selection with result |
↳ editor replace | @pragma editor append instructs editor plugin to append result |
↳ stream | @pragma stream disables body parser leaving req as stream |
You can set the content-type header either programaticaly or through the scripts manual.