This is a full-stack blog application built using Node.js, Express.js, SQLite, and React (with Vite). The backend manages the APIs and authentication using JSON Web Tokens (JWT), and the frontend provides the user interface for the blog features. The application includes user authentication, post creation, commenting, and different roles (user/admin) with specific permissions.
The application is containerized using Docker. You can use the Dockerfile and Docker Compose file to easily set up and run the application.
-
Clone the Repository
git clone <repository-url> cd blog-app
-
Build and Run with Docker Compose
docker-compose up --build
This command will build the image and start the container on port 80.
If you want to run the application locally without Docker, follow these steps:
-
Backend Setup
- Navigate to the root folder and install the backend dependencies:
npm install
- Navigate to the root folder and install the backend dependencies:
-
Frontend Setup
- Navigate to the
frontend
folder and install the dependencies:cd frontend npm install
- Build the Frontend
npm run build
- Navigate to the
-
Start the Server
- Return to the root folder and start the server:
npm start
- Return to the root folder and start the server:
You can access the application via at http://localhost:80
.