Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Help] Trying use as a node module #225

Open
max10rogerio opened this issue Jul 24, 2020 · 0 comments
Open

[Help] Trying use as a node module #225

max10rogerio opened this issue Jul 24, 2020 · 0 comments

Comments

@max10rogerio
Copy link

I'm trying add arena in a specific route on express, but I have this errors:

Refused to apply style from '<URL>' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
localhost/:73 GET http://localhost:9999/stats/queues/vendor/jsoneditor.min.js net::ERR_ABORTED 404 (Not Found)
localhost/:74 GET http://localhost:9999/stats/queues/vendor/tablesort.min.js 404 (Not Found)
(index):76 GET http://localhost:9999/stats/queues/dashboard.js net::ERR_ABORTED 404 (Not Found)
(index):73 GET http://localhost:9999/stats/queues/vendor/jsoneditor.min.js net::ERR_ABORTED 404 (Not Found)
(index):74 GET http://localhost:9999/stats/queues/vendor/tablesort.min.js net::ERR_ABORTED 404 (Not Found)
(index):76 GET http://localhost:9999/stats/queues/dashboard.js 404 (Not Found)
(index):78 Uncaught ReferenceError: Tablesort is not defined
    at (index):78

My code:

import "reflect-metadata";
import express from "express";

import Arena from "bull-arena";

const PORT = 9999;
const app = express();

const arena = Arena(
  {
    queues: [
      {
        name: "queue",
        hostId: "Queue Server 1",
        type: "bee",
        host: "127.0.0.1",
      },
    ],
  },
  {
    disableListen: true,
    basePath: "/stats/queues",
  },
);

app.use(express.json());

app.get("/", (request, response) =>
  response.json({
    message: "Meu server Express, Typescript e ESLint!",
  }),
);

app.get("/stats/queues", arena);

app.listen(PORT, () => {
  console.log(`Back-end started in ${PORT}!`);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants