This project is built on MERN stack, was bootstrapped with create-react-app. (MySQL: database, Express: web framework for NodeJS, React: JS library for UI, NodeJS: server/back end) However, video analysis part will be running in python3 environment.
In the project directory, you can run:
To install all required dependencies for this project.
To install all required libraries for python to run detection.
Create database table.
Before this, please create a user and database in mysql based on the following info:
host: 'localhost'
user: 'lauretta'
password: 'dahlsens'
database: 'dahlsens'
Edit server/config/database.js
for different cases.
Useful links: Install MySQL, Create User and Database , Reset password using ALTER command for MySQL<=5.7.6
After migrations,please log in to your mysql user and change the data type of b64img under table cameras to LONGTEXT:
mysql -u lauretta -p
use dahlsens;
ALTER TABLE
cameras
MODIFYb64img
LONGTEXT;quit
Runs npm run start
and npm run start:server
concurrently.
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
Backend server will be running on port 5000.
The page will reload if you make edits.
You will also see any lint errors in the console.
Before running the app, please disable Same-Origin Policy in Chrome to fix no 'Access-Control-Allow-Origin' header issue. For Firefox user, please install this extension to bypass CORS policy.
More info about CORS.