Created
June 28, 2020 11:24
-
-
Save evanxg852000/856204668a8823007ccc2be89bd83fe9 to your computer and use it in GitHub Desktop.
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
//functions.js | |
function API(req, res) { //http function | |
const ip = res.socket.remoteAddress; | |
console.log(`Client ip address is ${ip}.`); | |
res.writeHead(200); | |
res.end('Hello, World!'); | |
} | |
function Ticker(envs) { //cron function | |
console.log(envs); | |
console.log(`Ticker ticked at ${Date.now()}`); | |
} | |
module.exports = { | |
API, | |
Ticker | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment