Sample endpoints documentation
All Boiler Room boilerplates come with two sample endpoints for demonstration purposes.
If you are using a full-stack Boiler Room boilerplate you can interact with these two sample endpoints directly from the client. Simply start your application and navigate to http://localhost:3000/sample
.
If you are using an API Boiler Room boilerplate you can interact with these two sample endpoints using cURL or an API development environment such as Postman or Insomnia.
Note: the documentation below assumes that you are running the server side of your application on port 5000
. This is the defalt port all server-side Boiler Room boilerpaltes are configured to use.
#
Sample endpoint 1URL: /api/v1/sample
Method: GET
#
Success Response:Status Code: 200
Content:
#
Call using cURLOnce your application is running, run the following command in a second terminal window to test sample endpoint 1:
#
Sample endpoint 2URL: /api/v1/sample
Method: POST
Body:
#
Success Response:Status Code: 200
Content:
#
Error Response:Status Code: 400
Content:
#
Call using cURLOnce your application is running, run the following command in a second terminal window to test sample endpoint 2:
Note: if your Boiler Room boilerplate includes MongoDB you must set up your database connection before this will work.