/NodeNsfwJSAPI

NSFW-JS to detect image and gif, now with REST api

Primary LanguageJavaScript

NSFW API Detection with nodejs

Deploy

Self Signed SSL

  • mkdir certsFiles && cd certsFiles
  • sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ./selfsigned.key -out selfsigned.crt

or just use certbot (if you selfhost it)

  • sudo apt install -y certbot
  • certbot certonly --standalone -d yourdomain.com #need to have port 80 open and run as sudo if not root already
  • add CERTBOT=true on .env

TODO

  • Process external gif
  • Use preview gif for slow machine
  • imgur, giphy, etc
  • Documentation
  • Proper API

Preview

  • Not 100% perfect

  • response
  • after processing and some cahce (pi 4 B)

Misc

Adopted from: https://github.com/SashiDo/content-moderation-image-api, https://github.com/infinitered/nsfwjs

Preview: https://api.yeet.ml