Stackoverflow Clone Backend

screenshot of Stackoverflow Clone Backend
express

Backend code of the Stackoverflow Clone project. Built using Express, Node, MySQL, and Sequelize

Overview:

The Stackoverflow-Clone-Backend is a project that aims to replicate a famous Q/A website for programmers. The backend code is built using the MERN stack and supports both manual setup and Docker setup. The API endpoints are hosted on stackoverflow-clone-api.onrender.com and stackoverflow-clone-backend.herokuapp.com.

Features:

  • Tech Stack: Built using MERN stack (MongoDB, Express.js, React, Node.js).
  • Manual Setup: Allows for manual setup by cloning the code, setting up a .env file, and running the backend and frontend code.
  • Docker Setup: Supports running the backend in a Docker container with detailed instructions provided.
  • API Endpoints: Hosted endpoints for users, posts, answers, comments, tags, and more.
  • Postman Testing: Provides instructions for using Postman to test the API on a local machine.

Manual Setup:

  1. Open your local CLI.
  2. Setup the backend code by cloning the repository.
  3. Create a .env file based on the format provided in .env.example.
  4. Install the required modules.
  5. Open your MySQL Client and ensure the database name matches the one in .env.
  6. Run the backend with npm start.
  7. Clone the frontend code, install the modules, and run the client with npm start.

Docker Setup:

  1. Setup environment variables in .env file for Docker.
  2. Build the Docker image.
  3. Run the container with proper setup for MySQL Database IP. For example:
    docker run -p 5000:5000 <image_name>
    
  4. Access the API at the default port 5000.

Summary:

The Stackoverflow-Clone-Backend is a project that allows users to set up a Stackoverflow-like Q/A website using the MERN stack. With support for both manual and Docker setups, users can easily deploy and test the API endpoints provided. The detailed guidelines for setting up the backend and using Postman for testing make it convenient for developers to get started with this project.

express
Express

Express.js is a simple Node.js framework for single, multi-page, and hybrid web applications.

docker
Docker

A website that uses Docker for containerization to streamline development, testing, and deployment workflows. This includes features such as containerization of dependencies, automated builds and deployments, and container orchestration to ensure scalability and availability.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.