Perfeito, aqui está o README atualizado com a licença MIT:
This is a simple CRUD (Create, Read, Update, Delete) API built with Node.js, Express, and Firebase.
To get started with this project, follow these steps:
-
Clone the repository:
git clone https://github.com/seu-usuario/api-crud-node-express-with-firebase.git
-
Install dependencies:
cd api-crud-node-express-with-firebase npm install
-
Set up Firebase:
Create a Firebase project and obtain your Firebase credentials.
Then, create a file named
firebase.ts
inside thefirebase
folder with the following content:// Import the functions you need from the SDKs you need import { initializeApp } from "firebase/app"; // Your web app's Firebase configuration const firebaseConfig = { apiKey: "YOUR_API_KEY", authDomain: "YOUR_AUTH_DOMAIN", projectId: "YOUR_PROJECT_ID", storageBucket: "YOUR_STORAGE_BUCKET", messagingSenderId: "YOUR_MESSAGING_SENDER_ID", appId: "YOUR_APP_ID" }; // Initialize Firebase const app = initializeApp(firebaseConfig); export default app;
Replace
YOUR_API_KEY
,YOUR_AUTH_DOMAIN
,YOUR_PROJECT_ID
,YOUR_STORAGE_BUCKET
,YOUR_MESSAGING_SENDER_ID
, andYOUR_APP_ID
with your Firebase credentials. -
Start the development server:
npm run dev
Your API should now be running at
http://localhost:5050
.
npm run dev
: Starts the development server usingtsx
to watch for changes in TypeScript files.npm start
: Starts the server using Node.js.npm run build
: Builds the TypeScript files.npm test
: Runs tests (not implemented in this project).
- Express: Fast, unopinionated, minimalist web framework for Node.js.
- Firebase: Firebase SDK for JavaScript.
- Firebase Admin SDK: Firebase Admin Node.js SDK.
- uuid: Simple, fast generation of RFC4122 UUIDs.
- @types/express: TypeScript definitions for Express.
- @types/node: TypeScript definitions for Node.js.
- tsx: TypeScript transpiler.
- typescript: TypeScript language server and compiler.
This project is licensed under the MIT License. See the LICENSE file for details.
Make sure to replace the values for YOUR_API_KEY
, YOUR_AUTH_DOMAIN
, YOUR_PROJECT_ID
, YOUR_STORAGE_BUCKET
, YOUR_MESSAGING_SENDER_ID
, and YOUR_APP_ID
with your actual Firebase credentials. This README provides clear instructions on how to configure and start the project, as well as information about available scripts, dependencies, and licensing.