POST /api/say
curl -X POST http://localhost:3000/api/say -H "Content-Type: application/json" -d '{"message": "Hi!"}'
answer
{
"art": "Hello, I'm robot fedor and I'm here."
}
----------------------------
GET /api/greet
curl http://localhost:3000/api/greet
answer
{
"greeting": "Hello from robot fedor API!"
}
When using the API, don't forget to start the server with npm start.
Web Interface
The web interface allows users to send POST
and GET requests to generate ASCII art messages.
Running the Web Server
To run the web server, follow these steps:
1. node webfedorserver.js
2. open - http://localhost:3000