Skip to content

Highlighted-dev/forum-website-backend

Repository files navigation

Forum Website Backend

This is the backend for a forum website, built with Node.js, Express, and MongoDB. It provides RESTful APIs for user management, discussions, and chat functionalities.

Table of Contents

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/forum-website-backend.git
    cd forum-website-backend
  2. Install dependencies:

    npm install
  3. Create a .env file and add your environment variables:

    cp .env.example .env
  4. Build the project:

    npm run build

Usage

Development

To start the server in development mode:

npm run dev

Production

To start the server in production mode:

Docker

To build and run the Docker container:

docker-compose up --build

API Endpoints

User Routes

GET /externalApi/user/ - Retrieve all users GET /externalApi/user/:id - Retrieve a user by ID PUT /externalApi/user/:id - Update a user by ID

Discussion Routes

GET /externalApi/discussion/ - Retrieve all discussions POST /externalApi/discussion/ - Create a new discussion

Chat Routes

GET /externalApi/chat/ - Retrieve all chat messages POST /externalApi/chat/ - Send a new chat message

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published