Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/firebase/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js Firebase主机:我可以部署,但如何隐藏源代码_Node.js_Firebase_Firebase Realtime Database_Firebase Cloud Messaging - Fatal编程技术网

Node.js Firebase主机:我可以部署,但如何隐藏源代码

Node.js Firebase主机:我可以部署,但如何隐藏源代码,node.js,firebase,firebase-realtime-database,firebase-cloud-messaging,Node.js,Firebase,Firebase Realtime Database,Firebase Cloud Messaging,我已经使用Firebase主机部署了我的网站,但当我右键单击>查看页面源代码时:我可以看到源代码和我的Firebase项目信息 那么,我该如何隐藏它;我必须使用Node.js吗?还是云功能 我尝试了node的httpnpm const http=require('http') 但这没有帮助 我真的很困惑,请帮助我如果你想对你的用户隐藏一些东西,你需要将它隐藏在服务器端。因此,使用Firebase,您可以使用Firebase云函数。它们接受nodejs、python和typescript。如果要在

我已经使用Firebase主机部署了我的网站,但当我右键单击>查看页面源代码时:我可以看到源代码和我的Firebase项目信息

那么,我该如何隐藏它;我必须使用Node.js吗?还是云功能

我尝试了node的httpnpm const http=require('http')

但这没有帮助


我真的很困惑,请帮助我

如果你想对你的用户隐藏一些东西,你需要将它隐藏在服务器端。因此,使用Firebase,您可以使用Firebase云函数。它们接受nodejs、python和typescript。如果要在网站中存储变量,请使用数据库

之后,确保安全地设置数据库规则

onRequest();
function onRequest (req , res){
http.createServer(onRequest).listen(3000);
console.log("Success");
}