This is a simple Express.js application that serves tea-related content.
-
Clone the repository:
git clone https://github.com/grxkun/express-app-tea.git
-
Navigate to the project directory:
cd express-app-tea
-
Install dependencies:
npm install
Start the Express server:
node express-app-tea.js
The server will start running on http://localhost:3000
.
- GET /: Displays a welcome message.
- GET /tea: Responds with a message about enjoying a cup of tea.
- POST /tea: Expects a JSON body with 'flavor' and 'strength' properties. Responds with a message based on the received data.
To access the '/tea' route:
curl http://localhost:3000/tea
To make a POST request to the '/tea' route:
curl -X POST -H "Content-Type: application/json" -d '{"flavor": "green", "strength": "strong"}' http://localhost:3000/tea
This project is licensed under the MIT License - see the LICENSE file for details.