Full-stack MERN web application. Click here to preview.
- MongoDB
- Express
- React
- Redux
- NodeJS
- Formik
- Bootstrap
- Winston
- Docker
- User login
- User registration
- Create new post
- Add comments to post
git clone https://github.com/dominikjalowiecki/MERN-forum.git
cd ./MERN-forum
DB_URI=<mongodb-uri>
PORT=5000
COOKIE_SECRET=secret_phrase
FRONTEND_BASE_URL=http://localhost:3000
NODE_ENV=development
npm ci
cd ./client
npm ci
cd ..
npm run dev
docker compose up -d
Application available on http://localhost for frontend and http://localhost:5000 for backend.
Endpoint | Method | Request body | Authentication |
---|---|---|---|
/api/users/login | POST |
email password |
- |
/api/users/logout | POST |
- | - |
/api/users/register | POST |
username password confirmPassword |
- |
/api/users/me | GET |
- | + |
/api/posts | GET |
- | - |
/api/posts | POST |
title content |
+ |
/api/posts/:id | GET |
- | - |
/api/posts/:id/comments | POST |
content | + |