mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-17 00:34:41 -05:00
add new api stuff :3
This commit is contained in:
parent
6bcbf9ceb5
commit
0e90b72398
1 changed files with 82 additions and 82 deletions
12
server.js
12
server.js
|
@ -2,7 +2,7 @@
|
|||
|
||||
PokeTube is an Free/Libre youtube front-end. this is our main file.
|
||||
|
||||
Copyright (C) 2021-2022 POKETUBE (https://github.com/iamashley0/poketube)
|
||||
Copyright (C) 2021-2023 POKETUBE (https://github.com/iamashley0/poketube)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -18,6 +18,7 @@
|
|||
along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
*/
|
||||
|
||||
(async function () {
|
||||
const {
|
||||
fetcher,
|
||||
core,
|
||||
|
@ -28,8 +29,9 @@ const {
|
|||
initlog,
|
||||
init,
|
||||
} = require("./src/libpoketube/libpoketube-initsys.js");
|
||||
|
||||
const media_proxy = require("./src/libpoketube/libpoketube-video.js");
|
||||
const { sinit } = require("./src/libpoketube/init/superinit.js");
|
||||
const u = await media_proxy();
|
||||
|
||||
initlog("Loading...");
|
||||
initlog(
|
||||
|
@ -67,7 +69,6 @@ app.use(modules.express.urlencoded({ extended: true })); // for parsing applicat
|
|||
app.use(modules.useragent.express());
|
||||
app.use(modules.express.json()); // for parsing application/json
|
||||
|
||||
|
||||
const renderTemplate = async (res, req, template, data = {}) => {
|
||||
res.render(
|
||||
modules.path.resolve(`${templateDir}${modules.path.sep}${template}`),
|
||||
|
@ -93,7 +94,7 @@ this is our config file,you can change stuff here
|
|||
*/
|
||||
const config = {
|
||||
tubeApi: "https://tube-srv.ashley143.gay/api/",
|
||||
invapi: "https://inv.vern.cc/api/v1",
|
||||
invapi: u + "/api/v1",
|
||||
dislikes: "https://returnyoutubedislikeapi.com/votes?videoId=",
|
||||
t_url: "https://t.poketube.fun/", // def matomo url
|
||||
};
|
||||
|
@ -106,6 +107,5 @@ app.use(function (req, res, next) {
|
|||
|
||||
sinit(app, config, renderTemplate);
|
||||
|
||||
|
||||
init(app);
|
||||
|
||||
})();
|
||||
|
|
Loading…
Reference in a new issue