https://github.com/coderamrin/devlog
multi author blog application with MERN
https://github.com/coderamrin/devlog
Last synced: 10 months ago
JSON representation
multi author blog application with MERN
- Host: GitHub
- URL: https://github.com/coderamrin/devlog
- Owner: Coderamrin
- License: mit
- Created: 2022-12-23T12:24:21.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-31T08:59:49.000Z (over 3 years ago)
- Last Synced: 2025-03-04T08:26:55.308Z (about 1 year ago)
- Language: JavaScript
- Size: 2.81 MB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Devlog
A Multi author blog application with MERN
### [Live Preview](https://devlogg.onrender.com/)
## Table Of Content:
## 1. [Backend](#backend)
- [End points](#endpoints)
- [Technologies used](#technologies-used)
- [Getting started](#getting-started)
## 2. [Frontend](#frontend)
---------------------
# Backend
## Endpoints
**Base URL** : https://devlog.onrender.com/
**User**
| Description | Method | URL |
| ----------- | ----------- |------
| Register | POST | /api/user/register
| Login | POST | /api/user/login
| Get curent user | GET | /api/user/loggedin
**Post**
| Description | Method | URL |
| ----------- | ----------- |------
| Get all posts | GET | /api/posts/
| Get all posts by current user | GET | /api/posts/my-posts
| Get a post by Id | GET | /api/posts/:id
| Add a new post | POST | /api/posts/new-post
| Edit a post | PUT | /api/posts/edit/:id
| Delete a post | DELETE | /api/posts/delete/:id
| Add a comment on a post | POST | /api/posts/:id/comment
**Coment**
| Description | Method | URL |
| ----------- | ----------- |------
| Add a comment on a post | POST | /api/posts/:id/comment
| Delete a comment on a post | DELETE | /api/posts/:id/:commentId/delete
## Technologies Used
- Node.js
- Express.js
- MongoDB
- MongoDB Atlas
- Mongoose
- Jsonwebtoken
## Getting Started
**Clone the repo**
```
git clone https://github.com/Coderamrin/devlog.git
cd devlog
```
**Set up env file**
```
DB_URL=[DB url to connect the database with the server]
PORT=[developement port]
JWT_SECRET=[jasonwebtoken secret for token]
```
**Install and start**
```
npm i
npm run server
or
npm run start
```
## Frontend
## Project Preview


