Etc

Firebase Server 연동-2

85chong 2022. 5. 16. 16:26
728x90
반응형
SMALL

main.js 파일

    
    var mData;
    
    function yckinitializeApp() {
        var firebaseConfig ={
            apiKey: "AIzaSyCbvCvI3Dpkn36pIuwdes30Vmw6ugSytao",
            authDomain: "temptestserver.firebaseapp.com",
            databaseURL: "https://temptestserver-default-rtdb.firebaseio.com",
            projectId: "temptestserver",
            storageBucket: "temptestserver.appspot.com",
            messagingSenderId: "582158887911",
            appId: "1:582158887911:web:e8f9d55e624eeecbe22b42",
            measurementId: "G-J9FHYD2DNK"
        };
        firebase.initializeApp(firebaseConfig);
    }        

    function getDataBaseData(){
        var ref = firebase.database().ref();
        ref.on('value', function(snapshot) {
            mData = snapshot.val();
            console.log(mData);
        }, function (error) {
            console.log("Error: " + error.code);
        });
    }
    
    // server -> App
    function reqUserInfo(){

    }

    yckinitializeApp();

    getDataBaseData();

'Etc' 카테고리의 다른 글

Rest api 이름 규칙  (0) 2024.10.10
Fireabse Server 연동  (0) 2022.05.16
Etc - Study(이것저것)  (0) 2022.01.06
Node 환경 셋팅 in VScode  (0) 2021.12.01
Node > Firebase > ios App Push (Node코드만있음)  (0) 2021.07.08