https://soruly.github.io/trace.moe-api/
API server for serving backend requests for trace.moe
https://soruly.github.io/trace.moe-api/
Last synced: 3 months ago
JSON representation
API server for serving backend requests for trace.moe
- Host: GitHub
- URL: https://soruly.github.io/trace.moe-api/
- Owner: soruly
- License: mit
- Created: 2019-09-27T16:55:08.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-19T04:02:18.000Z (7 months ago)
- Last Synced: 2024-10-19T13:13:56.624Z (7 months ago)
- Language: JavaScript
- Homepage: https://soruly.github.io/trace.moe-api/
- Size: 32 MB
- Stars: 123
- Watchers: 5
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- public-apis - Trace Moe
- public-apis - Trace Moe
- public-apis - Trace Moe
README
# trace.moe-api
[](https://github.com/soruly/trace.moe-api/blob/master/LICENSE)
[](https://github.com/soruly/trace.moe-api/actions)
[](https://codecov.io/gh/soruly/trace.moe-api)
[](https://hub.docker.com/r/soruly/trace.moe-api)
[](https://hub.docker.com/r/soruly/trace.moe-api)
[](https://discord.gg/K9jn6Kj)API server for [trace.moe](https://github.com/soruly/trace.moe)
[API Docs](https://soruly.github.io/trace.moe-api/)
### Features
- 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### Prerequisites
- Node.js 20.x
- mariaDB 10.4.x
- ffmpeg 4.x
- java (openjdk 17)
- [liresolr](https://github.com/soruly/liresolr)
- g++, cmake (if you need to compile OpenCV)### Install
Install Prerequisites first, then:
```
git clone https://github.com/soruly/trace.moe-api.git
cd trace.moe-api
npm install
```### Configuration
- Copy `.env.example` to `.env`
- Edit `.env` as appropriate for your setup, i.e. `VIDEO_PATH` and `HASH_PATH`### Start server
You can use [pm2](https://pm2.keymetrics.io/) 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
```### How to begin hashing
By default, it will scan the `VIDEO_PATH` every minute for new video files (.mp4 or .mkv or webm). You can manually trigger a scan by calling this url
```
curl http://localhost:3001/scan
```