mirror of
https://codeberg.org/ashley/poke.git
synced 2025-06-12 23:13:03 -04:00
libpoketube 2.0!
This commit is contained in:
parent
489ff9df37
commit
d8f8cba576
1 changed files with 19 additions and 2 deletions
49
src/libpoketube/libpoketube-initsys.js
Normal file
49
src/libpoketube/libpoketube-initsys.js
Normal file
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
|
||||
PokeTube is a Free/Libre youtube front-end !
|
||||
|
||||
Copyright (C) 2021-2022 POKETUBE
|
||||
|
||||
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
|
||||
|
||||
*/
|
||||
|
||||
function initlog(args){
|
||||
console.log("[LIBPT INTSYS] " + args)
|
||||
}
|
||||
|
||||
function init (app, port){
|
||||
if(!port) port = "3000"
|
||||
try {
|
||||
app.listen(port, () => {
|
||||
initlog("Loading Poketube: success!" + " on port " + port);
|
||||
});
|
||||
} catch (err) {
|
||||
initlog("Loading Poketube: error", err);
|
||||
}
|
||||
|
||||
}
|
||||
module.exports =
|
||||
{
|
||||
fetcher:require("../libpoketube/libpoketube-fetcher.js"),
|
||||
core:require("../libpoketube/libpoketube-core.js"),
|
||||
musicInfo:require("music-info"),
|
||||
wiki:require("wikipedia"),
|
||||
initlog,
|
||||
init,
|
||||
version:"libpoketube-2.0-git",
|
||||
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"),
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue