Last active
May 31, 2020 00:32
-
-
Save reichert621/18e096679161528aaf0eb0d93315cc9e to your computer and use it in GitHub Desktop.
Taro Example: Ping your server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const request = require('superagent'); | |
const ping = async () => { | |
const res = await request.get('https://taro-beta.herokuapp.com/api/ping'); | |
return res.body; | |
}; | |
// Run function and verify output | |
ping().then(console.log).catch(console.log); | |
const main = () => ping(); | |
// You must have a default export of the function you want to run | |
// in order for it to be deployed and scheduled | |
module.exports = main; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment