add: added camera flux from M5CAM
This commit is contained in:
parent
6163219336
commit
78a6d26984
16 changed files with 4391 additions and 0 deletions
19
back/index.js
Normal file
19
back/index.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
const express = require("express");
|
||||
const app = express();
|
||||
const http = require("http");
|
||||
|
||||
http.get("http://192.168.4.1/", (cameraRes) => {
|
||||
app.get("/api/video", (req, res) => {
|
||||
res.writeHead(200, {
|
||||
"Content-Type": "multipart/x-mixed-replace; boundary=123456789000000000000987654321"
|
||||
});
|
||||
|
||||
cameraRes.on("data", (chunk) => {
|
||||
res.write(chunk)
|
||||
});
|
||||
|
||||
cameraRes.on("end", () => res.end());
|
||||
});
|
||||
});
|
||||
|
||||
app.listen(3000, () => console.log("Server running on http://localhost:3000"));
|
Loading…
Add table
Add a link
Reference in a new issue