Jordan Manu Instagram Challenge#918
Conversation
JordanManu
commented
May 15, 2022
- Features
- Users can post pictures
- Users can write comments on pictures
- Users can like a picture
- Styled awesomely
|
|
||
|
|
||
|
|
||
|
|
| .post-image{ | ||
| height: 300px; | ||
| } | ||
| } No newline at end of file |
| beforeAll(function (done) { | ||
| mongoose.connect("mongodb://0.0.0.0/acebook_test", { | ||
| useNewUrlParser: true, | ||
| useUnifiedTopology: true, | ||
| }); |
| - You will need to create an account to be able to use the program and make posts | ||
| - Once signed up, you'll be directed to the sign in page | ||
| - After you're signed in you will be able to post photos with a caption. | ||
| - Just click on the post icon in the top right corner, there you can enter a url of your image and add a caption. |
| const PostsController = { | ||
| Index: (req, res) => { | ||
| Post.find({}) | ||
| .sort({ _id: -1 }) |
There was a problem hiding this comment.
Good, reversing posts so that newest gets shown first
| console.log("Update likes in controller"); | ||
| console.log(req.params.id); | ||
| const action = req.body.action; | ||
| const counter = (action === "Like" ? 1 : -1); |
There was a problem hiding this comment.
Good Like / Unlike feature, but currently can use refresh to keep adding likes, if had more time you could consider to record likes in the database so that likes are unique
| @@ -0,0 +1,38 @@ | |||
| const User = require("../models/user"); | |||
| const bcrypt = require("bcrypt"); | |||
| }; | ||
|
|
||
|
|
||
| module.exports = mongoose.model("User", UserSchema); No newline at end of file |
mcsuGH
left a comment
There was a problem hiding this comment.
Amazing CSS, looks great. Tests are all passing but missing a test to test the like functionality. Password encryption is implemented. Users can log in but may need a log out button for logging out. Good instructions on README + nice video showcasing the webpage.
Can look into adding more functionality once possible, and can make further improvements to already-existing functionality (such as making likes unique).