API server for trace.moe
- serve image search request
- crop black borders on search images
- rate limiting and user management
- serve index and database status
- store and serve compressed hash files
- distribute hash jobs to workers
- Node.js 20.x
- mariaDB 10.4.x
- ffmpeg 4.x
- java (openjdk 17)
- liresolr
- g++, cmake (if you need to compile OpenCV)
Install Prerequisites first, then:
git clone https://github.com/soruly/trace.moe-api.git
cd trace.moe-api
npm install
- Copy
.env.example
to.env
- Edit
.env
as appropriate for your setup, i.e.VIDEO_PATH
andHASH_PATH
You can use pm2 to run this in background in cluster mode.
Use below commands to start / restart / stop server.
npm run start
npm run stop
npm run reload
npm run restart
npm run delete
By default, it will scan the VIDEO_PATH
every minute for new video files (.mp4 or .mkv). You can manually trigger a scan by calling this url
curl http://localhost:3001/scan