Skip to main content

Server Endpoints

Testing Endpoints with CURL and WebSocat

Testing endpoints is an essential part of ensuring the correctness and functionality of your app. Depending on what options are used for gofast project creation, you have various endpoints for testing your init application status.

Before proceeding, ensure you have the following tools installed:

  • Curl: A command-line tool for transferring data with URLs.
  • WebSocat: A command-line WebSocket client. You can utilize alternative tools that support the WebSocket protocol to establish connections with the server. WebSocat is an open-source CLI tool, while Postman or Insomnia serves as a GUI tool specifically designed for testing APIs and WebSocket functionality.

Hello world Endpoint

To test the Hello World endpoint, execute the following curl command:

curl http://localhost:<YOUR_APPLICATION_PORT>

Sample Output:

{"message": "Hello World"}