Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/usmanmusa1920/3mtt-assessment-backend
Blog app
https://github.com/usmanmusa1920/3mtt-assessment-backend
Last synced: 8 days ago
JSON representation
Blog app
- Host: GitHub
- URL: https://github.com/usmanmusa1920/3mtt-assessment-backend
- Owner: usmanmusa1920
- Created: 2024-05-05T22:08:16.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-06-25T14:34:41.000Z (4 months ago)
- Last Synced: 2024-06-25T16:12:39.987Z (4 months ago)
- Language: Handlebars
- Homepage: https://threemtt-assessment.onrender.com
- Size: 3.24 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Blog App
A simple blogging webapp built using NodeJS, ExpressJS and MongoDb. Authenticated and authorization functions with passport
## Functions
- SignIn - Login into existing account
- SignUp - Signup using username and password
- Add Post - Add your post with an image and text
- Remove - Remove a post
- Edit - Edit an existing post## Checkout Hosted WebApp here
[Click here ✌](https://threemtt-assessment.onrender.com)
## Routes
- GET /posts - To view all the posts
- GET /user/:username - To view specific post by a user
- POST /posts/publish - To add new post (when user is authenticated andauthorized only)
- GET /posts/:id - To get a post with specific id
- PUT /posts/:id - To update specific post with unique Id
- Delete /posts/:id - To delete specific post with unique Id## Project Archietecture
```tree
├── app.js
├── middleware
└── index.js
├── models
├── comment.js
│ ├── post.js
│ └── user.js
├── node_modules
├── package.json
├── package-lock.json
├── public├── readme.md
├── routes
│ ├── comments.js
│ ├── index.js
│ ├── posts.js
│ └── user.js
└── views
├── comments
├── landing.hbs
├── login.hbs
├── posts
└── register.hbs
```# How to run
Note the connection of database is base on environment variable like `mongo_uri = '**********************************************************'`
But the environment variable for this project might be embeded in the server (render.com) when deployed!
- Git clone repository
- Then run these commands in terminal/shell```npm
npm install
npm start
```