https://github.com/rockchalkwushock/simple-blog
Simple Blog based on REST API convention
https://github.com/rockchalkwushock/simple-blog
ejs-express express mongodb now-cli
Last synced: about 1 month ago
JSON representation
Simple Blog based on REST API convention
- Host: GitHub
- URL: https://github.com/rockchalkwushock/simple-blog
- Owner: rockchalkwushock
- Created: 2017-08-14T21:52:06.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-14T22:19:31.000Z (almost 9 years ago)
- Last Synced: 2025-06-27T17:49:05.648Z (12 months ago)
- Topics: ejs-express, express, mongodb, now-cli
- Language: HTML
- Homepage: https://simple-blog-bccpqpmxki.now.sh
- Size: 43.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple Blog
A simple blog.
This project utilizes the latest JavaScript syntax available in NodeJS.
[Live Demo](https://simple-blog-bccpqpmxki.now.sh)
> Note: Deployment is not scaled and database is a free sandbox might take a while to fire up!
## Concepts Covered
- [x] REST API Architecture.
- [x] Promises using `async/await` syntax.
- [x] Dry code by creating middlewares.
- [x] noSQL Database (`mongodb`)
- [x] `ejs` templating
## REST API Architecture
Name | Endpoint | Verb | Description |
-------|----------------------|---------|-------------------------------------------------------------------|
INDEX | / | GET | Redirect to `/posts`. |
NEW | /posts | GET | Render view for *all* posts. |
GET | /posts/new | GET | Render view for adding new post. |
CREATE | /posts | POST | Add a post to the database. |
SHOW | /posts/:id | GET | Render view for *single* post. |
EDIT | /posts/:id/edit | GET | Render view for editing a post. |
UPDATE | /posts/:id | PUT | Render view *after* updating a post with updated post. |
REMOVE | /posts/:id | DELETE | Render view *after* removing a post with list of remaining posts. |
## TODO
- [ ] Clean up Styling
- [ ] Handle error cases better.