Skip to content

Example for integration Moesif API Analytics with HAPI Js framework

Notifications You must be signed in to change notification settings

Moesif/moesif-nodejs-hapi-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hapi with Moesif Integration

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.

Prerequisites

  • Node.js (version 12 or higher)
  • npm (Node Package Manager)

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd <repository-directory>
  2. Install the dependencies:

    npm install

Configuration

  1. Replace 'YOUR_MOESIF_APPLICATION_ID' in server.js with your actual Moesif Application ID.

Running the Server

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.

Moesif Integration

The moesifHapiPlugin is used to integrate Moesif with the Hapi server. It logs all incoming API requests to Moesif for monitoring and analysis.

License

This project is licensed under the MIT License.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

About

Example for integration Moesif API Analytics with HAPI Js framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published