REST service test using MERN stack
yarn, or
npm i
yarn start, or
npm start
cd client
yarn, or
npm i
yarn start, or
npm start
Method: GET, http://localhost:4000/api/gateway
Method: GET, http://localhost:4000/api/gateway
Params, Query params
Key: id
Value: 61f318f4e0b6282a7d25c81d
Method POST, http://localhost:4000/api/gateway
Body, raw, JSON:
{
"serial": "SERIAL",
"name": "Name",
"address": "10.5.44.109"
}
Method PATCH, http://localhost:4000/api/gateway
Body, raw, JSON:
{
"id": "61f325c496d178b8a73d6eb2",
"serial": "NEW SERIAL",
"name": "New Name",
"address": "10.5.44.10"
}
Method DELETE, http://localhost:4000/api/gateway
Body, raw, JSON:
{
"id": "61f325c496d178b8a73d6eb2"
}
Method: GET, http://localhost:4000/api/peripheral
Method: GET, http://localhost:4000/api/peripheral
Params, Query params
Key: id
Value: 61f318f4e0b6282a7d25c81d
Method POST, http://localhost:4000/api/peripheral
Body, raw, JSON:
{
"gatewayId": "61f318f4e0b6282a7d25c81d",
"uid": 1,
"vendor": "Vendor",
"status": "online"
}
Method PATCH, http://localhost:4000/api/peripheral
Body, raw, JSON:
{
"id": "61f32dc37a822ee314f50818",
"uid": 1,
"vendor": "Vendor",
"status": "offline"
}
Method DELETE, http://localhost:4000/api/peripheral
Body, raw, JSON:
{
"id": "61f32dc37a822ee314f50818"
}