GithubHelp home page GithubHelp logo

lab-file-upload's Introduction

logo_ironhack_blue 7

LAB | Express IronTumblr

Introduction

We have learned how to upload files and now is the time to practice this a bit more.

Requirements

  • Fork this repo
  • Clone this repo

Submission

Upon completion, run the following commands:

$ git add .
$ git commit -m "done"
$ git push origin master

Create Pull Request so your TAs can check up your work.

Instructions

Tumblr is an ultra-popular micro-blogging website.

A micro-blog is: a social media site to which a user makes short, frequent posts.

This is easier shown than described, so check out this tumblr filled with funny dog memes.

Iteration 1 | User Profile Picture

We have already provided you with the user model, as well as fully functional authentication logic. However, one thing is missing. The user doesn't have a profile picture. Add a new property to the user model, and fix user registration so that it allows the user to upload a profile picture.

Iteration 2 | Posts

In this iteration, create the bread and butter of the IronTumblr - the posts.

First, create a Post model. A post should have the following attributes:

  • content - the text belonging to the post
  • creatorId - ObjectId of the post's creator (the user who created a post)
  • picPath - where the picture is stored
  • picName - the picture's name

For this iteration, besides the model, you have to create:

  • the GET route to display the post-form,
  • the POST route to actually create the post (this route should include file uploading),
  • the GET route to display the posts and
  • the GET route to display post-details.

A user should be logged in to create a post, but not to view it. (Check the route guard file in the configs folder.)

The posts will be the home page, and simply display all of the posts on the website.

Bonus: Iteration 3 | Comments

Posts should have comments attached to them. Create the Comment model as a sub-document of the Post. A comment can have images attached to it, but not all do, so it is not required.

The Comment model should have the following attributes:

  • content
  • authorId
  • imagePath
  • imageName

You should create routes to create new comments. Comments should be displayed on the details page of a single post.

Bonus: Iteration 4 | Deployment

The last step in IronTumblr should be to deploy the app to Heroku. Don't forget to deploy your database on MongoLab/Mongo Atlas.

Your site should be live and functioning with a working public URL.

Happy coding! ❤️

lab-file-upload's People

Contributors

filipe-freire avatar jalexy12 avatar nizaroni avatar papuarza avatar sandrabosk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.