Closed GurinderRawala closed 1 month ago
The changes in this pull request include updates to the README.md
file to clarify the server build process by adding the command npm run build
. Additionally, the src/api/routes/files.js
file has been modified to enhance logging for successful file uploads and improve error handling in the file deletion route. Finally, the CORS configuration in the src/api/server.js
file has been altered to allow requests from any origin instead of a specific one.
File | Change Summary |
---|---|
README.md |
Added instruction for building the server with npm run build under "Get Started." |
src/api/routes/files.js |
Introduced logging for successful file uploads and improved error handling in the delete file route. |
src/api/server.js |
Modified CORS configuration to allow requests from any origin by changing origin to a wildcard ('*' ). |
sequenceDiagram
participant Client
participant Server
participant Database
Client->>Server: Upload file
Server->>Database: Save file info
Database-->>Server: Confirm save
Server->>Client: File uploaded successfully
Server->>Server: Log "file info uploaded successfully"
Client->>Server: Delete file
Server->>Database: Find file info
Database-->>Server: Error (file not found)
Server->>Server: Log error message
Server->>Client: Error deleting file
🐰 "In the meadow where we play,
New instructions lead the way.
With logs to guide and errors clear,
Building servers brings us cheer!
Hops of joy, we celebrate,
Changes made, oh, isn’t fate great?" 🌼
Summary by CodeRabbit
New Features
npm run build
.Improvements
Configuration Changes