Skip to content

Vankerkom/trace.moe-api

This branch is 60 commits behind soruly/trace.moe-api:master.

Folders and files

NameName
Last commit message
Last commit date
Aug 31, 2024
Mar 10, 2024
Mar 5, 2024
Mar 16, 2024
Oct 17, 2024
Oct 19, 2024
Mar 7, 2024
Mar 16, 2024
Mar 16, 2024
Dec 2, 2021
Jun 20, 2020
Apr 23, 2020
Mar 5, 2024
Sep 27, 2019
Mar 11, 2024
Oct 13, 2024
Sep 20, 2021
Mar 9, 2024
Mar 16, 2024
Dec 6, 2021
Oct 29, 2024
Oct 29, 2024
Apr 1, 2024
Aug 22, 2021

Repository files navigation

trace.moe-api

License GitHub Workflow Status Codecov Docker Docker Image Size Discord

API server for trace.moe

API Docs

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
  • 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 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). You can manually trigger a scan by calling this url

curl http://localhost:3001/scan

About

API server for serving backend requests for trace.moe

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 97.4%
  • HTML 2.3%
  • Dockerfile 0.3%