This project demonstrates how to integrate the moesif-nodejs
middleware with a Hapi server. The integration allows you to log API calls to Moesif for monitoring and analysis.
- Node.js (version 12 or higher)
- npm (Node Package Manager)
-
Clone the repository:
git clone <repository-url> cd <repository-directory>
-
Install the dependencies:
npm install
- Replace
'YOUR_MOESIF_APPLICATION_ID'
inserver.js
with your actual Moesif Application ID.
Start the Hapi server by running:
node server.js
The server will start on http://localhost:5050
. You can access the following endpoints:
GET /
: Returns a welcome message.POST /body
: Returns a message for POST requests.
The moesifHapiPlugin
is used to integrate Moesif with the Hapi server. It logs all incoming API requests to Moesif for monitoring and analysis.
This project is licensed under the MIT License.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.