firebase-nodejs
8/2/2017
Fixed bugs - Add callback to the some function
- Remove default path
List function update, have a callback
function
- selectData
- authFacebook
- authUser
updateUser
updateEmail
sendVerifyEmail
changePassword
deleteUser
logout
Example new version updated.
Before updated : Have a error from return Promise, now edit.
firebaseDomdefault;
New version : Remove default path. Before :
firebaseDomdefaultfirebaseConfig
Now :
firebaseDomfirebaseConfig
New version : Add callback function for return value from firebase query. But can't return out the function, you can use state from push on state.
firebaseDom;
Firebase SDK for Node.js
Get install !!
npm install --save firebase-nodejs firebase
Optionals
- selectData For select data from firebase
- insertData For insert data into firebase
- deleteData For delete data on firebase
- updateData For update data on firebase
- authUser For manage user on firebase
- authFacebook For auth from facebook
New update 5/3/2017
- searchData => searchByValue You can use for search data by value
How to use it ?
Create firebase.js on you app folder, and write code below. You can use data from your firebase project.
; var config = apiKey: '' authDomain: '' databaseURL: '' storageBucket: '';const firebase = firebaseDom;;
So you add my code on you another file for use firebase.
Examples
; //add you firebase.js path; { superprops; thisstate = member: {} ; } { let memberData = firebaseDom; } { return }
Use another
authUser an authFacebook
You can authen user from firebase, Use facebook loggin only.
Get current user.
const data = firebaseDomauthUser;
Logon by use facebook access token.
firebaseDom;
User data.
let currentUserData = firebaseDomauthUser;currentUserDataname = 'new my name';firebaseDomauthUser;
User email.
firebaseDomauthUser;
User delete.
firebaseDomauthUser;
Logout !
firebaseDomauthUser;
searchData
Search by value
const searchKey = 'member_name';const searchValue = 'handdleName';firebaseDomsearchData
selectData
firebaseDom;
insertData
const member = name: 'test' age: 17const insertStatus = firebaseDom;
updateData
const member = name: 'test' age: 18const updateStatus = firebaseDom;
deleteData
const deleteStatus = firebaseDom;