Nov 02, 2022
Share article to
Learn the installation of Firebase, Node.js, npm, and React on macOS.
In this tutorial we are going to learn the installation of Firebase, Node.js, npm, and React on macOS.
Firebase is not only hosting a custom backend with Node.js, but also all the parts you need for a fullstack project, like databases, file hosting, authentication & much more on Google Cloud Platform.
React is a library which helps developers to develop highly efficient data-driven SPA apps. It is based on functional programming, relies on the concept of immutability and encourages component-based architecture based on the Single reusability principle.
Node.js is a JavaScript-based environment which you can use to create web-servers and networked applications. You can also use it to perform helpful tasks on your computer such as concatenating and minifying JavaScript files and compiling Sass files into CSS.
npm is a “package manager” that makes installing Node “packages” fast and easy. A package, also called a module, is just a code library that extends Node by adding useful features. For example, the “request” module simplifies the process of making HTTP requests so you can easily get web resources from other sites.
Download Node.js for macOS on https://nodejs.org/en/.
Check availability and version Node.js.
node -v
Check availability and version npm.
npm -v
Open Visual Studio Code and start with.
npm start
Then open http://localhost:3000 on browser.
Add Firebase to your web app on Console.
Install Firebase tools that will allow you to deploy your React app.
npm install firebase-tools -g
Login to Firebase.
firebase login
Set a project default.
firebase use
Firebase init.
firebase init
And selected.
Build your app for production.
npm run build
Deploy React app.
firebase deploy
This article Firebase, Node.js and React on MacOS has been updated from various original sources.