INNER CODE UNIT · JavaScript
get
guobao2333/DeepLX-Serverless · src/server.js:124
async function get(req, res) {
res.status(200).json({
code: 200,
message: "Welcome to the DeepL Free API. Please POST to '/translate'. Visit 'https://github.com/guobao2333/DeepLX-Serverless' for more information."
});
};
function check_cors(arg) {
if (arg === undefined) return;
if (typeof arg === 'string' || typeof arg === 'boolean') return arg;
console.error("ParamTypeError: \x1b[33m'"+arg+"'\x1b[31m, origin should be Boolean or String.\n\x1b[0meg: \x1b[32m'*' or true or RegExp");
process.exit(1);
}
function check_port(arg) {
if (typeof arg === 'number' && !isNaN(arg) && Number.isInteger(arg) && arg >= 0 && arg <= 65535) return arg;