Skip to content

lunayht/Dahlsensdemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Available Scripts

In the project directory, you can run:

npm install or npm i

To install all required dependencies for this project.

pip3 install -r requirements.txt

To install all required libraries for python to run detection.

npm run migrate

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 MODIFY b64img LONGTEXT;
  • quit

npm run dev

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.

Remarks

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.