As the name suggests, this project is a clone of a famous Q/A website for professional and enthusiast programmers built solely by me using a completely different stack.
This repo consists of the Backend code of the project, the backend code is in Stackoverflow-Clone-Frontend
React.js (with Redux)SASS and BOOTSTRAPNode.js with Express.js FrameworkMySQL with SequelizePOSTMANThere are two ways to setup the project: manually or using the Dockerfile. Read below for more details:
mkdir Stackoverflow-Clone
cd Stackoverflow-Clone
Setup the backend code -
Create a .env file and the format should be as given in .env.example.
Clone the code & install the modules-
``` git clone https://github.com/Mayank0255/Stackoverflow-Clone-Backend.git cd Stackoverflow-Clone-Backend
npm install ```
Open your MySQL Client -
CREATE DATABASE stack_overflow;
NOTE: Don't forget to keep the database name same in the .env and here.
Run the index npm start.
Open a new CLI terminal and goto the root Stackoverflow-Clone folder you created in the first step.
Setup the Frontend code -
Clone the code & install the modules-
``` git clone https://github.com/Mayank0255/Stackoverflow-Clone-Frontend.git cd Stackoverflow-Clone-Frontend
npm install ```
Run the client index npm start.
The back-end has support for Docker. So if you want to run the back-end in a container, you need do:
Setup environment variables in .env file. Note when you use Docker setup and run the database in localhost (host machine), you need to setup the environment variables for use correct IP of MySQL Database. Please, read here and here for more details.
Build the Docker image:
docker build -t stackoverflowclone .
docker run -d -p 5000:5000 stackoverflowcloneThe default port of api is 5000. After running the container, you can access the api by typing:
http://localhost:5000/api/<endpoint that you request - see next section>
Follow the steps properly (manual or Docker) and you are good to go.
API is currently hosted on stackoverflow-clone-api.onrender.com and stackoverflow-clone-backend.herokuapp.com.
You can view and read the API endpoints samples here. This is API documentation for the back-end.
But, if you want use Postman to test the API in local machine, you need to follow the steps below:
{API_URL}/apiGET /authPOST /authPOST /users/:idGET /usersGET /users/:idGET /postsGET /posts/topGET /posts/tag/:tagnameGET /posts/:idPOST /posts/DELETE /posts/:idGET /posts/answers/:idPOST /posts/answers/:idDELETE /posts/answers/:idGET /posts/comments/:idPOST /posts/comments/:idDELETE /posts/comments/:idGET /tagsGET /tags/:tag_nameVideo Last Updated on 7th March, 2022




$ claude mcp add Stackoverflow-Clone-Backend \
-- python -m otcore.mcp_server <graph>