poke/src/libpoketube/libpoketube-initsys.js

52 lines
1.2 KiB
JavaScript
Raw Normal View History

2022-10-28 16:46:35 +02:00
/*
PokeTube is a Free/Libre youtube front-end !
2023-04-02 18:53:59 +02:00
Copyright (C) 2021-2023 POKETUBE
2022-10-28 16:46:35 +02:00
This file is Licensed under LGPL-3.0-or-later. Poketube itself is GPL, Only this file is LGPL.
see a copy here:https://www.gnu.org/licenses/lgpl-3.0.txt
please dont remove this comment while sharing this code
*/
2022-11-09 15:17:03 +01:00
function initlog(args){
console.log("[LIBPT INTSYS] " + args)
}
function init (app, port){
if(!port) port = "3000"
2023-06-02 18:03:09 +02:00
2022-11-09 15:17:03 +01:00
try {
app.listen(port, () => {
initlog("Loading Poketube: success!" + " on port " + port);
});
2023-06-02 18:03:09 +02:00
2022-11-09 15:17:03 +01:00
} catch (err) {
2023-06-02 18:03:09 +02:00
2022-11-09 15:17:03 +01:00
initlog("Loading Poketube: error", err);
}
}
2022-10-28 16:46:35 +02:00
module.exports =
{
fetcher:require("../libpoketube/libpoketube-fetcher.js"),
core:require("../libpoketube/libpoketube-core.js"),
musicInfo:require("music-info"),
wiki:require("wikipedia"),
2022-11-09 15:17:03 +01:00
initlog,
init,
2023-06-02 18:03:09 +02:00
version:"libpoketube-3.1.1-git-aStfl",
2022-10-29 09:49:18 +02:00
modules:{
fetch:require("node-fetch"),
toJson:require("xml2json").toJson,
express:require("express"),
useragent:require("express-useragent"),
path:require("path"),
hash:require("js-sha512").sha384,
moment:require("moment"),
getColors:require("get-image-colors"),
}
2023-06-02 18:03:09 +02:00
}