Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

minegit/chat-server

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chat-server

A simple REST API based chat server.

#Project setup

This project requires 1. Django (Installed) 2. mysql (installed with proper cred) 3. python libraries

Please update my,cnf according to your mysql creds.

Then run python manage.py run migrations Then run the app by python manage.py runserver 8000

It will run the server in the localhost:8000/ port.

REST API : 1. An api send message from a user to another user. http://127.0.0.1:8000/chat/send?from=2&to=3&msg=asdsd23

	Response : 
		{
			status: 200,
			message: "Suitable Message"       // status will be 200 in case of successfull response.
		}

		or 

		{
			status: 201,
			message: "Suitable Message"        // in case of any error status will not be 200
		}
2.An api to get all the new messages for a user send from another user.
	http://127.0.0.1:8000/chat/get?user_id=31&from_id=2
	from_id is optional here. If it is given then it pick new messages
	from this user only otherwise all the messages from all the users will be fetched.

	{
		status: 200,
		message: [
			"asdsd23"
			]
		}

	or
	{
			status: 201,
			message: "Suitable Message"        // in case of any error status will not be 200
		}

About

A simple REST API based chat server.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.