Last active
January 29, 2020 02:47
-
-
Save klogic/ce4e20a0f4380998f0809cfe5c7d070c 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
import { Response, Request } from "express"; | |
const kue = require("kue"); | |
const express = require("express"); | |
const app = express(); | |
const port = 3000; | |
const axios = require("axios"); | |
const queue = kue.createQueue(); | |
app.get("/", (req: Request, res: Response) => { | |
for (let i = 1; i <= 20; i++) { | |
queue | |
.create("queue example", { | |
title: "This testing request", | |
data: i | |
}) | |
.priority("high") | |
.save(); | |
} | |
res.send("Hello World!"); | |
}); | |
app.use("/kue-api/", kue.app); | |
app.listen(port, () => console.log(`Example app listening on port ${port}!`)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@emmanuelakuffo can you email me: [email protected] so we can talk from their about you project. also please provide me a code that have problem so I can have a look.