Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blog Site Hit Counter with User Input Logger

This project implements a hit counter for a blog site using an Express server and a MongoDB database. Additionally, it relies on the JSON provided by the user-input-logger to log user information.

Blog Integration

This hit counter and user input logger are integral parts of my blog site. They enhance the user experience by providing valuable insights into visitor interactions and engagement.

Links

GitHub Repository : BLOG REPOSITORY

Live Project: BLOG SITE

Installation

Clone the repository:

git clone https://github.com/IntegerAlex/hitsregister

Install dependencies: npm install

Set up environment variables:

Create a .env file in the root directory of the project and add the following variables:

MONGODB_USERNAME=<your-mongodb-username>
MONGO_DB_PASSWORD=<your-mongodb-password>

Start the server:

npm start

Usage

Hit Counter Endpoint: The server listens for POST requests to /visit to register hits on the blog site. The client can send JSON data containing user information, and the server logs this information to the MongoDB database.

User Input Logger: This project includes a custom npm library called user-input-logger to log user information. This library logs information such as user agent, IP address, timestamp, etc., and stores it in the MongoDB database.

Dependencies

  • Express: Fast, unopinionated, minimalist web framework for Node.js.
  • MongoDB: General-purpose, document-based, distributed database built for modern application developers and for the cloud era.
  • user-input-logger: Custom npm library for logging user input information. user-input-logger

Contributing

Contributions are welcome! Please fork the repository, make changes, and submit a pull request.

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

About

middle-ware to help store fingerprint-oss data from users to MongoDB

Resources

Stars

0 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages