Giter VIP home page Giter VIP logo

mini-project's Introduction

README

This README would normally document whatever steps are necessary to get the application up and running.

Things you may want to cover:

  • Ruby version ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]

  • Database version 10.4.8-MariaDB

  • Ruby on Rails Rails 6.0.4.1

  • Configuration open folder config > database.yml change value from

  username: root
  password:
  socket: /opt/lampp/var/mysql/mysql.sock

according to the installed mysql authentication

  • Database creation Create database wich name are "BackendMiniProject_development" , "BackendMiniProject_test" , "BackendMiniProject_production"

  • Database initialization

  • How to run the test suite type this command in terminal inside this root folder of application rake db:migrate then rake db:seed run this command to run this application rails s

  • API

  1. Users can send a message to another user
POST /send_message HTTP/1.1
Host: 127.0.0.1:3000
Content-Type: application/json
Content-Length: 68

{
	"user_id_sender":"1",
	"user_id_reciver":"3",
	"text":"Hallo"
	
} 
  1. Users can list all messages in a conversation between them and another user.
GET /message/1 HTTP/1.1
Host: 127.0.0.1:3000
Content-Type: application/json
Content-Length: 23

{
	"my_user_id":"1"
	
}
  1. Users can reply to a conversation they are involved with.
POST /reply_message HTTP/1.1
Host: 127.0.0.1:3000
Content-Type: application/json
Content-Length: 90

{
    "room_id" : "1",
	"user_id_sender":"2",
	"user_id_reciver":"1",
	"text":"sehat?"
	
}
  1. User can list all their conversations
GET /list_message_user/1 HTTP/1.1
Host: 127.0.0.1:3000

or you can import this collection to your postman https://www.getpostman.com/collections/4610bae82a915a86ba8d in postman: click import, click tab link paste url above to text box, then click continue

mini-project's People

Contributors

gaspan 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.