You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a basic Go application using the Fiber framework to create a web server. The server listens on port 3000 and has a single route (GET /) that fetches data from an external URL (https://dummyjson.com/products/1) and forwards it to the client.
How to Run
Clone the repository.
Navigate to the project directory.
Run go run main.go.
Visit http://localhost:3000/ in a web browser or use a tool like curl to test it.
What It Does
Fetches data from an external service, in this case DummyJson.com
Forwards the fetched data or an error message to the client.
Error Handling
Returns a 500 Internal Server Error if any issue occurs during the fetch.
Returns the same status code as the external service if it's not a 200 OK.