About β’ Tech Stack β’ How it works β’ Endpoints β’ Documentation β’ Authors β’ License
Chat with Socket.IO created at RocketSeat Next Level Week 5.0, using stack TypeScript with Node.js.
The following tools were used in the construction of the project:
- Node.js
- Express
- TypeORM
- Sqlite3
- Metadata Reflection API
- uuid
- socket.io
- socket.io-client
- Embedded JavaScript templates
Before you begin, you will need to have the following tools installed on your machine: Git, Node.js and Yarn. In addition, it is good to have an editor to work with the code like VSCode.
# Clone this repository
$ git clone https://github.com/BiaChacon/chatty.git
# Access the project folder cmd/terminal
$ cd chatty
# go to the api folder
$ cd api
# install the dependencies
$ npm install
#Create migrations
$ yarn typeorm migration:run
# Run the application
$ yarn dev
# The server will start at port: 3333 - go to http://localhost:3333
π To access the Admin chat go to π http://localhost:3333/pages/admin
π To access the Client chat go to π http://localhost:3333/pages/client
Settings
- Body
{
"chat": "true",
"username": "admin"
}
[
{
"id": "admin_id",
"username": "admin",
"chat": "true",
"updated_at": "2021-04-22T19:22:37.000Z",
"created_at": "2021-04-22T19:22:37.000Z"
}
]
- Body
{
"chat": "false"
}
User
- Body
{
"email": "example@email.com"
}
[
{
"id": "user_id",
"email": "example@email.com",
"created_at": "2021-04-22T19:37:24.000Z"
}
]
Message
- Body
{
"user_id": "user_id",
"text": "message"
}
[
{
"id": "message_id",
"text": "message",
"user_id": "user_id",
"created_at": "2021-04-23T19:40:02.000Z"
}
]
[
{
"id": "message_id",
"admin_id": "admin_id",
"text": "message",
"user_id": "user_id",
"created_at": "2021-04-22T19:40:02.000Z",
"user": {
"id": "user_id",
"email": "example@email.com",
"created_at": "2021-04-22T19:37:24.000Z"
}
}
]
Bia Chacon π» |
This project is under MIT. See at here LICENSE for more information.