Right now I am attempting to set up the firebase admin for a firebase project I am trying to create. The project is an admin site that is supposed to upload data to an app. The point is to create a site that trusted people can access so those people don't have to log into the project owner's email to enter this data. The site is also supposed to help manage those users. I need to be able to use the firebase admin functions to create and edit users.
Therefore, I need to add the Admin SDK to my project. It says to add it to a Node.js project which is what I have. I followed all the instructions for the basic setup. I then tried to initialize the admin functions from a function in my html page. I realize I could do it via an external file, but as a newer user of many of these functions and having been through a large headache trying to setup these external files before, I felt I would set up the thing in the page for now to get all the functions working then move it all to an external file later. However, when I attempt to test my code, I get the require is not defined
error. I did some research to find a solution and came upon the module.config.js
approach. I attempted to set it up the way they did, but the question was related to just running the Firebase SDK. This is the first time I have heard of Webpack and don't have a massive background in web design. You could say its a hobby ATM.
Basically, rn I need help setting up this config file so that I can run
var admin = require("firebase-admin");
var serviceAccount = require("path/to/serviceAccountKey.json");
admin.initializeApp({
credential: admin.credential.cert(serviceAccount)
});
I copied and pasted the base webpack.config.js
file from https://webpack.js.org/configuration/
and placed it in my directory which looks like this: The main folder: https://i.stack.imgur.com/KIp3l.png
and the files in dist which is basically my entire project: https://i.stack.imgur.com/Aq2Pj.png https://i.stack.imgur.com/IP87C.png
Can someone explain what needs to be done to run the admin initialization so I can run the user editing commands on my project? I know what I need to do once this is set up, but I don't know what I need to do to set it up so once I get this done, I will be pretty much set.