okay
This commit is contained in:
35
readme.md
Normal file
35
readme.md
Normal file
@@ -0,0 +1,35 @@
|
||||
📨 REST API
|
||||
|
||||
Endpoint:
|
||||
|
||||
# code derek bashga messageler hem ugradyp bilersiniz
|
||||
|
||||
POST /api/data
|
||||
Body (JSON görnüşinde):
|
||||
|
||||
{
|
||||
"phone": "63435005",
|
||||
"code": "1234"
|
||||
}
|
||||
Jogap (Response):
|
||||
|
||||
{
|
||||
"message": "Data received and processed successfully.",
|
||||
"received": {
|
||||
"phone": "63435005",
|
||||
"code": "1234"
|
||||
}
|
||||
}
|
||||
📡 Socket.IO Ulanylyşy
|
||||
|
||||
Baglanyşyk döretmek:
|
||||
|
||||
const socket = io("http://localhost:3000");
|
||||
Ibermek:
|
||||
|
||||
socket.emit("sendSignInData", { phone: "63435005", code: "1234" });
|
||||
Almak:
|
||||
|
||||
socket.on("sendSmsCode", (data) => {
|
||||
console.log(data);
|
||||
});
|
||||
Reference in New Issue
Block a user