Move list of extensions to backend
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
const express = require("express");
|
const express = require("express");
|
||||||
|
|
||||||
|
const extensions = require("./src/extensions");
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
|
|
||||||
app.use(
|
app.use(
|
||||||
@@ -16,6 +18,8 @@ app.get("/", (req, res) =>
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
app.get("/api/", (req, res) => res.json(extensions));
|
||||||
|
|
||||||
// Box Novel
|
// Box Novel
|
||||||
app.use("/api/1/", require("./src/en/boxnovel/boxnovel"));
|
app.use("/api/1/", require("./src/en/boxnovel/boxnovel"));
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
extensions = [
|
||||||
|
{
|
||||||
|
sourceId: 1,
|
||||||
|
sourceName: "BoxNovel",
|
||||||
|
sourceCover:
|
||||||
|
"https://boxnovel.com/wp-content/uploads/2018/04/BoxNovel-1.png",
|
||||||
|
sourceLanguage: "English",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sourceId: 2,
|
||||||
|
sourceName: "ReadLightNovel",
|
||||||
|
sourceCover: "https://www.readlightnovel.org/assets/images/logo6.png",
|
||||||
|
sourceLanguage: "English",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
module.exports = extensions;
|
||||||
Reference in New Issue
Block a user