firebase-crud
firebase-crud copied to clipboard
FirebaseCrud
This is the code for a tutorial series that can be found on progblog.io
In this tutorial we start with a blank app generated using Angular CLI. We use Firebase to make the next steps EASY. First, we use Firebase's authentication to add Google Login. We later extend that to also use email/password. We then use the Firebase Realtime Database to make a simple chat app. This project is my attempt to show how easy Firebase makes seemingly arduous tasks.
Sections
Part 1: Installing necessary components. Generating a blank app through Angular CLI. Add Bootstrap for styling. Create Firebase account. Install and setup Firebase through NPM.
The code for part 1 can be found here.
Part 2: Add user login through their Google account. Create the Login Page and Home Page Components. Add asynchronous monitoring of the logged in status. Redirect to the Home Page when logged in and to the Login Page when the user logs out.
The code for part 2 can be found here.
Part 3: We will add a simple chat app that stores messages into a Firebase Realtime Database.
The code for part 3 can be found here.
Part 4: We add Email/Password user authentication using Firebase.
The code for part 4 can be found here.
Part 5: COMING SOON Adding the ability for a user to edit or delete any messages that they have sent.
Development server
Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
Code scaffolding
Run ng generate component component-name to generate a new component. You can also use ng generate directive/pipe/service/class/module.
Build
Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the -prod flag for a production build.
Running unit tests
Run ng test to execute the unit tests via Karma.
Running end-to-end tests
Run ng e2e to execute the end-to-end tests via Protractor.
Before running the tests make sure you are serving the app via ng serve.
Deploying to Github Pages
Run ng github-pages:deploy to deploy to Github Pages.
Further help
To get more help on the angular-cli use ng help or go check out the Angular-CLI README.