From the course: Angular: Creating and Hosting a Full-Stack Site

Unlock the full course today

Join today to access over 24,000 courses taught by industry experts.

Add Firebase to hapi

Add Firebase to hapi

- Now that should be all we need to do to add Firebase to our front end. The next thing we're going to do is add Firebase to our backend. Now on our front end, we're going to be using Firebase Auth to allow users to log in and log out, and we'll see how that's done shortly, but it's only half of the equation. What we need to do also, is use Firebase Auth on our backend to do things like verify users and make sure that users are only allowed to edit and delete their own listings. So adding Firebase to our backend is pretty similar to what we just did with our front end, except the names of the packages are going to be slightly different. And actually, the only package we'll need to install here is called Firebase Admin, which we can install by saying npm install, firebase admin, and hitting Enter. And once we've done that, we'll need to open up our server.js file. And up at the top of the file, we need to import…

Contents