/Hit-Api

Hit API is a logger of mouse movement and click

Primary LanguageJavaScriptMIT LicenseMIT

Hit API

This project sets up an Express.js server with Docker Compose for easy deployment and management of PostgreSQL, pgAdmin, and InfluxDB containers. Hit API is a logger of mouse movement and click

Table of Contents

  1. Installation
  2. Installation
  3. Usage
  4. Configuration
  5. Docker Stup
  6. License

Installation

To install project dependencies, run:

npm install

Usage

To start the server, run:

npm start

To start developer mode the server, run:

npm run start:watch

Configuration

Ensure you have a .env file in the config, you have sample of this file:

NODE_ENV=
PORT=
FRONTEND_APP_HOST=
DATABASE_USER=
DATABASE_HOST=
DATABASE_NAME=
DATABASE_PASSWORD=
DATABASE_PORT=
EMAIL_ADDRESS
EMAIL_PASSWORD=
JWT_SECRET=
JWT_EXPIRE=
INFLUX_URL=
INFLUX_TOKEN=
INFLUX_ORG=
INFLUX_BUCKET=

Docker Setup

To set up the project with Docker, ensure you have Docker installed on your machine. Then, run the following command:

docker-compose up -d

This will spin up PostgreSQL, pgAdmin, and InfluxDB containers with the required configurations.

License

This project is licensed under the MIT License.