The laziest app you've ever used. Guaranteed, or your money back.
This simple app will sleep for a specified amount of time and then return a generic response. Nap Time is a useful tool for when you need to simulate slow third-party server responses or handle timeouts in your API wrappers.
- Configure
server.json
with the port you want to listen on. - Start the server using Commandbox:
server start
- Make a request to the server and append the number of seconds you want to sleep for in the path like this
http://127.0.0.1:{port}/{sleep}/
- Example: http://127.0.0.1:6969/60/
The server will sleep for the number of seconds specified in the sleep
parameter and then return a generic JSON response object. The default sleep time is set to 30 seconds if no sleep
parameter is specified in the path.
{
error: false,
data: "",
messages: [
"What a nice 30 second nap"
]
}
Designed and developed by Angry Sam Productions, Inc. Visit us at angrysam.com.
This software is licensed under the MIT License. See the LICENSE file for details.
"Chuck Norris can write infinite recursion functions... and have them return."
Photo of bear sleeping by Vecteezy