nodejs version warning and it also appears in version page.

This commit is contained in:
vexorian 2021-09-20 09:23:47 -04:00
parent b7d61cb707
commit 0b1dc22e6c
4 changed files with 14 additions and 1 deletions

View File

@ -35,6 +35,12 @@ console.log(
'------------'
`);
const NODE = parseInt( process.version.match(/^[^0-9]*(\d+)\..*$/)[1] );
if (NODE < 12) {
console.error(`WARNING: Your nodejs version ${process.version} is lower than supported. dizqueTV has been tested best on nodejs 12.16.`);
}
for (let i = 0, l = process.argv.length; i < l; i++) {
if ((process.argv[i] === "-p" || process.argv[i] === "--port") && i + 1 !== l)

View File

@ -38,6 +38,7 @@ function api(db, channelDB, fillerDB, customShowDB, xmltvInterval, guideService
res.send( {
"dizquetv" : constants.VERSION_NAME,
"ffmpeg" : v,
"nodejs" : process.version,
} );
} catch(err) {
console.error(err);

View File

@ -4,6 +4,7 @@ module.exports = function ($scope, dizquetv) {
dizquetv.getVersion().then((version) => {
$scope.version = version.dizquetv;
$scope.ffmpegVersion = version.ffmpeg;
$scope.nodejs = version.nodejs;
})

View File

@ -20,7 +20,12 @@
<td>FFMPEG</td>
<td><div class='loader' ng-if="version.length &lt;= 0"></div>{{ffmpegVersion}}</td>
</tr>
<!-- coming soon, ffmpeg version, nodejs version, plex version, whatever can be used to help debug things-->
<tr>
<td>nodejs</td>
<td><div class='loader' ng-if="version.length &lt;= 0"></div>{{nodejs}}</td>
</tr>
<!-- coming soon: plex version, whatever can be used to help debug things-->
</table>
</div>