Replies: 1 comment 1 reply
-
Hi, Thanks for the detailed question. I appreciate it. I did kind of gloss over the setup for the firebase project. I didn't do anything special in particular besides change engine to 10 like you mentioned. But let me answer the questions instead.
I was going to cover the environment to develop in when we start the development in the backend. So i didn't think about making the tutorial around how it was initialised, and i do see the error in that thinking now. Maybe I'll do a quick overview before we start the development on the backend to make sure that everyone's environment is setup correctly. Thanks again for the detailed question, I hope I answered it for you. |
Beta Was this translation helpful? Give feedback.
-
Hey guys,
first of all, great job and big probs on doing this. So much value and I'm recommending this to all my dev friends haha!
I have some questions regarding the setup of this project. Excuse my experience level on this but never worked with javascript/typescript before and I'm also not a backend dev. Unfortunately there is no video explaining on how to set this all up, but only a walkthrough of the already existing setup. (Don't get me wrong, this is not blaming at all! :) ) I've read multiple comments on how to set this up and I guess there are many other people like me asking themselves the same questions I'm going to ask in this Q&A.
I will first explain the steps I did and then ask where I'm still unsure. Maybe this will also help many other beginners to understand better and to resolve open questions. It will be a bit long but I think going through the steps will ensure that people of different experience levels can follow more easily.
So when I tried to setup up the same structure as you I did some research on how to setup such a firebase project. I did the following steps:
src
folder andbackend
subfolderbackend
foldernpm install -g firebase-tools
--> installs Firebase CLIfirebase login
--> for authenticationfirebase init
--> initialize the firebase projectHope so far all good. I was unsure about the ESLint but I think you created your own linter file.
Outcome of this in the project:
firebase.json
,.firebaserc
and.gitignore
files were createdQuestion 1)
In
firebase.json
there is generated code inside such as:Looking at your
firebase.json
there is something whole different in it. Did you change it by yourself? What's the meaning of this file? How did you come up with does ports?Also
functions
folder was created and has following folders/files:-
src
folder with anindex.ts
file in it-
.gitignore
,package.json
,package-lock.json
andtsconfig.json
filesQuestion 2)
In
package.json
there is the node version of 12 defined. You have 10 there. Can I just change it and runnpm install
to update the project or how else can I update the node version? In general when I add some dependencies to this file I always runnpm install
in order to update the project. Hope this is fine.You added to the project manually two more files:
tslint.json
andindex.ts
(>>>not<<< theindex.ts
file within thesrc
folder!!!)Question 3)
The
tslint.json
is getting for me an error as there are commented lines. So how can you not get any errors? In json files it is not possible to have comments. Did you autogenerated that file or from where does this come from?Question 4)
In the
index.ts
(again: >>>not<<< theindex.ts
file within thesrc
folder!!!) there is only one line of code:When I manually create this file, this code is causing an error in VS Code. It's not valid typescript code. In your video I've seen that whenever you click into the file the errors are appearing and when you click into another file they are gone. But for me there are always there. So, from where does this file come from and what's the purpose of it? And how do I resolve those errors?
This is it from my side. I will follow this project intensely! I hope those questions and step by step explanation will help all the people who are at a similar experience level or have similar questions.
Hope to hear from you or anyone from the community.
Many thanks and all the best!
Beta Was this translation helpful? Give feedback.
All reactions