Firebase Firestore add item issue

When you construct a custom type and trying to add to firestore. with the following text book code: constructor(private afs: AngularFirestore) { this.itemsCollection = afs.collection<Item>(‘items’); this.items = this.itemsCollection.valueChanges(); } add(item: Item){ this.itemsCollection.add(item); } There will be an error: Exception caught: (FirebaseError) : Function CollectionReference.add() requires its first argument to be of type object, but it…

Google OAuth2 with ExpressJs

It took me a bit effort to understand google api example of oauth and how to apply to your webpage with Expressjs. if you are nodejs guru, this article is probably not for you. But if you find the original example provided by google is not straight forward, read on. (here is original google api of…