Created
May 3, 2020 19:57
-
-
Save piyushgarg-dev/d1313849689afc9206d15a5f4ef9d798 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 express = require('express'); | |
const cron = require('node-cron') | |
const app = express(); | |
cron.schedule('0 0 1 * *', () => { | |
console.log('running every 1st of the month'); | |
}); | |
app.get('/', (req, res) => { | |
res.json('Welcome to my API'); | |
}) | |
app.listen(9000, () => console.log(`Server Started at PORT: 9000`)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment