JSON Api With Node / Express / Firestore ( Demo / Code Review ).

preview_player
Показать описание
This is a simple Json Api using the Firestore database and Express.
In the video you will see how to manage the documents and collections inside Firestore, and how to return the data using Express json() function.
I was thinking about doing a Express and MongoDB Json Api, but since firestore is schemeless was easier and faster to build.
** This is a demo, changes might be needed, and auth must be implemented, but you can use it as a reference.
Рекомендации по теме
Комментарии
Автор

How to make new file likes users.js, example products.js. I try to copy users.js, and it's not working. Error: initializeApp is duplicated.
In index.js:
//---routes definition
const users = require("./routes/users");
const products =

//---routes usage
//this is the route
basic_api.use("/api/", users);
basic_api.use("/api/", products);

namnam
Автор

For creating a new user, you really shouldn't generate your own number. Where you have:

You should simply replace this with:

justjoshingaround