Skip to content

muhammedikinci/ts-chat-api

Repository files navigation


Chat API

Chat API project with RabbmiMQ, MongoDB, SocketIO and TypeScript

Table of Contents
  1. Getting Started
  2. API Reference
  3. Test
  4. Contact

Getting Started

Prerequisites

  • node & npm & npx & typescript
  • Docker

Installation

  1. Clone the repo
    git clone https://github.com/muhammedikinci/ts-chat-api
    cd ./ts-chat-api
  2. Run docker compose file (with data)
    docker compose -p "chat" up -d

Installation Without Docker

This action needs the installation of RabbitMQ and MongoDB manually.

  1. Clone the repo

    git clone https://github.com/muhammedikinci/ts-chat-api
    cd ./ts-chat-api
  2. Install dependencies

    npm install -g typescript
    npm install -g ts-node
    npm install
  3. Start RabbitMQ and MongoDB Services

  4. Build typescript

    npm run build
  5. Start

    npm run start

API Reference

POST /register

curl --request POST \
  --url http://localhost:8291/api/register \
  --header 'Content-Type: application/json' \
  --data '{
	"username":"muhammed",
	"password":"123456789"
    }'

POST /login

curl --request POST \
  --url http://localhost:8291/api/login \
  --header 'Content-Type: application/json' \
  --data '{
	"username":"muhammed",
	"password":"123456789"
    }'

Test

npm run test

Drawings

Screenshot_1 Screenshot_2 Screenshot_3

Contact

Muhammed İKİNCİ - muhammedikinci@outlook.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published