INNER CODE UNIT · JavaScript
check_port
guobao2333/DeepLX-Serverless · src/server.js:139
function check_port(arg) {
if (typeof arg === 'number' && !isNaN(arg) && Number.isInteger(arg) && arg >= 0 && arg <= 65535) return arg;
console.warn('WARNING:\x1b[0m port should be >= 0 and < 65536.\nUsed default value instead: 6119\n');
return 6119;
}
// 启动本地服务器
app.listen(PORT, () => {
console.log(`Server is running and listening on http://localhost:${PORT}/translate`);
});
export { post, get };