GithubHelp home page GithubHelp logo

twitter-clone's Introduction

GET /tweet your tweets

POST /tweet create tweet

GET /feed get tweets from followin ppl

GET /tag/:tag Get all tweets with that tag

GET /tweet/:userId Get all users tweets

POST /follow/ follow an user

GET / all user data

To add

GET /users

GET /users/:userId get user data

POST /profile user profile data

Twitter-Clone by jorlee92

Node.JS and MongoDB based twitter clone

Installation

  1. Use git to clone the repo locally
  2. From the folder you placed the files in run the command 'npm install', this will install the dependencies the project needs
  3. Create a .env file in the root folder, in that you will need to define GOOGLE_CLIENT_SECRET and GOOGLE_CLIENT_ID, both of these can be obtained by requesting a new API key from Google, See Here
  4. You will also need to define MONGODB_URL in your .env file, and connect to a MongoDB server, the easiest route is likely installing MongoDB locally and defining it as "mongodb://localhost:27017/"
  5. After that you should be able to start the server by running "node app.js" from the root folder.

API

GET /tweets/ - Shows all of the logged in user's most recent tweets

POST /tweets/ - Creates a new post as the logged in user, you need to have the body of the request contain "tweet_text", the hashtags will be grabbed from that same text.

GET /tweets/feed - Shows the most recent tweets by user's the logged in user is following.

GET /tweets/tag/ - Allows you to search all tweets for a provided hashtag (In this case Anything)

GET /tweets/ - Allows you to see tweets by a particular user

POST /users/follow - Adds the provided user to the list of user's followed by the logged in user, the request body should have "user_to_follow" and "user_to_follow" needs to be an ObjectID

GET /auth/google - Allows the user to sign in using Google Oauth2

twitter-clone's People

Contributors

marcinjak9 avatar

Stargazers

Fabio avatar

Watchers

James Cloos avatar  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.