Git Product home page Git Product logo

social-media-api's Introduction

Scaffold for social media app with Ruby on Rails

This repo includes intial code for social media app with basic styling. Its purpose is to be a starting point for Microverse students.

Built With

  • Ruby v2.7.2
  • Ruby on Rails v6.0.3
  • RubyMine
  • GitHub
  • Heroku
  • PostgreSQL

Linters

  • Rubocop
  • Stylelint

Live Demo

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

  • Ruby: v2.7.2
  • Rails: v6.0.3
  • Postgres: >=9.5

Setup

Instal gems with:

bundle install

Setup database with:

rails db:create
rails db:migrate

Usage

Start server with:

rails server

Open http://localhost:3000/ in your browser.

Run tests

rpsec --format documentation

API Endpoints

List all posts

http://localhost:3000/api/v1/posts

List comments for given post

http://localhost:3000/api/v1/posts/:post_id/comments

To create comments you must first create a user, can create the user with the API.

http://localhost:3000/api/v1/users

screenshot

Copy the provided token and paste it into Authorization section for Beaver Token

And finally can create a new comment with the POST method sending the comment as JSON

http://localhost:3000/api/v1/posts/:post_id/comments

Deployment

Authors

๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป Kenny Ortega

๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป Sunny Dรญaz

๐Ÿ‘ฉโ€๐Ÿ’ป Rocio Martinez

๐Ÿค Contributing

Contributions, issues and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a โญ๏ธ if you like this project!

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.