π Welcome to the Files App Backend repository! This is the backend server for the Files App, providing API endpoints for user authentication, file management, comments, and user operations.
π Register a User
- Endpoint:
/api/auth/register
- Method:
POST
- Description: Register a new user.
π Login User
- Endpoint:
/api/auth/login
- Method:
POST
- Description: Authenticate a user and retrieve an access token.
π¬ Get All Comments
- Endpoint:
/api/comments
- Method:
GET
- Description: Retrieve all comments.
βοΈ Create a Comment
- Endpoint:
/api/comments
- Method:
POST
- Description: Create a new comment.
ποΈ Delete a Comment
- Endpoint:
/api/comments/:id
- Method:
DELETE
- Description: Delete a comment by ID.
π Get All Files
- Endpoint:
/api/files
- Method:
GET
- Description: Retrieve all files.
β¬οΈ Upload a File
- Endpoint:
/api/files
- Method:
POST
- Description: Upload a new file.
π Get File by ID
- Endpoint:
/api/files/:id
- Method:
GET
- Description: Retrieve a file by ID.
ποΈ Delete a File
- Endpoint:
/api/files/:id
- Method:
DELETE
- Description: Delete a file by ID.
π₯ Get All Users
- Endpoint:
/api/users
- Method:
GET
- Description: Retrieve all users.
π€ Get User by ID
- Endpoint:
/api/users/:id
- Method:
GET
- Description: Retrieve a user by ID.
βοΈ Update User
- Endpoint:
/api/users/:id
- Method:
PUT
- Description: Update a user by ID.
ποΈ Delete User
- Endpoint:
/api/users/:id
- Method:
DELETE
- Description: Delete a user by ID.
π£ Please note that these are just examples based on the information provided. You may need to further customize and update the documentation according to your specific project requirements.
βοΈ Node.js π MongoDB π¦ Nest.js π· TypeScript
π οΈ To get started with the Files App, follow these steps:
- Clone repo https://github.com/creend/Files-App-Backend
npm install
- Crete .env file
- In .env set
SECRET_TOKEN=YOUR SECRET TOKEN
- In .env set
DATABASE_URL=YOUR MONGO DB DATABASE URL
- In mongodb cloud configure atlas search
- First index's name is "default" and indexed fields are dynamic
- Second index's name is "autocomplete" and indexed field is "title" https://www.youtube.com/watch?v=3IDlOI0D8-8&t=897s (Full autocomplete mongodb guide)
npm run start:dev
- Clone repo https://github.com/creend/Files-App-Frontend
npm install
npm run dev
π Congratulations! You now have the Files App Frontend up and running locally.
This project is licensed under the MIT License.
For any inquiries or feedback, please reach out to the project maintainer:
π€ Creend
π§ Email: creend42@gmail.com
πΌ GitHub: @creend