-
Run the command go run main.go to compile and execute the program.
-
Open a web browser and navigate to http://localhost:8080
-
You should see the message "Hello, World!" in the browser, and a log file called "api.log" should be created in the same directory as main.go.
Here's an example of what the console output should look like:
2023/04/10 15:42:17 Starting server on port 8080
2023/04/10 15:42:24 Request from 127.0.0.1:50586 for /
2023/04/10 15:42:27 Request from 127.0.0.1:50586 for /favicon.ico