How to use Firebase tools on Windows?

I want to get started with firebase on a Windows machine, but I don't understand how to get started on https://www.firebase.com/docs/web/quickstart.html .

I created a .html file with the following contents (copied from the instructions on this page). This works, information is added to the database and retrieved from the database. However, I got lost in Linux, like instructions like $ npm install -g firebase-tools on this page.

I installed nodejs after the link to nodejs.org at https://www.firebase.com/docs/hosting/quickstart.html

If I executed the above command (without linux $ -prompt) on the node.js screen, I get the following error message: npm should be run outside of the node repl, in your regular shell. (Press Control-D to exit.)

So what?

<html>
    <head>
        <script src="https://cdn.firebase.com/js/client/2.2.1/firebase.js"></script>
    </head>
    <body>
    <script>
        var myFirebaseRef = new Firebase("https://torrid-inferno-6000.firebaseio.com/");
        myFirebaseRef.set({
            title: "Hello!",
            author: "Firebase",
            location: {
                city: "San Francisco",
                state: "California",
                zip: 94103
            }
        });
        myFirebaseRef.child("location/city").on("value", function(snapshot) {
            alert(snapshot.val());  // Alerts "San Francisco"
        });
    </script>
    </body>
</html>
+2
source share
2 answers

Basically, I had to open the command line and switch to C: \ Program Files \ nodejs, where the npm file is located), then npm commands can be executed according to the instructions. Later, when firebase is installed, restarting changes to the PATH environment variable takes effect. After that, the firebase command (init, deploy, ...) can be used to deploy the site.

+8
source

Firepit - CLI-, Windows, firebase-

Firepit - , Firebase CLI, ( Node.js). , firebase npm.

https://github.com/abehaskins/firepit

0

Source: https://habr.com/ru/post/1651026/


All Articles