1.
Download web server Nginx
http://nginx.org
this local server is for html response
2.
Register Firebase remote server
https://firebase.google.com
Firebase can create chat and webrtc server free
Peer to peer authenticate through the Firebase remote server.
3.
Go to Firebase control panel
https://console.firebase.google.com
Build you own project and click project name
click web application to get [firebase.js] file link as follows:
<script src="https://www.gstatic.com/firebasejs/3.3.0/firebase.js"></script>
<script>
// Initialize Firebase
var config = {
apiKey: "AIzaSyDZqApef4F2-CkzFhseCCf_UAaaFJQ9K2E",
authDomain: "project-5907664917268693265.firebaseapp.com",
databaseURL: "https://project-5907664917268693265.firebaseio.com",
storageBucket: "project-5907664917268693265.appspot.com",
};
firebase.initializeApp(config);
</script>
Here is we want: https://www.gstatic.com/firebasejs/3.3.0/firebase.js
4.
Write you own html and java script. Done.
Demo chat room:
http://www.mediafire.com/download/k7cagq3c911kbde/nginxweb.zip
沒有留言:
張貼留言