GithubHelp home page GithubHelp logo

theenoro / szurubooru-to-booru-api Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 20 KB

extension for szurubooru to use it in Booru Nav

License: MIT License

Dockerfile 1.33% JavaScript 98.67%
danbooru docker es6 image-board-engine nodejs szurubooru proxy-server

szurubooru-to-booru-api's Introduction

szurubooru to booru api

Info

Asking why? No? :( anyway

I'm using an app called Booru Nav where you can add various types of Booru based websites. The selfhosted booru variant szurubooru isn't supported, cause the API endpoints doesn't match. That is why I've decided to make a converter proxy thing.

What is Booru?

In short: Booru based websites are image hosting websites where you can of course upload images, add meta information, add related images of somethin, comments, create image collections called pools.

Maybe I'm wrong, but it's sort of my definition.

What does it?

This thing rewrites the szurubooru endpoint that the app can understand. Basically it rewrites the json request from the app to the one szurubooru understands and then rewrites the response.

The app doesn't try a request on /api/posts, instead it other urls like /posts.json.

Install

Docker - Stack

Docker

Structure in this configuration

server:
    dockerHost:
        ip: 192.168.0.2
        # installed szurubooru with exposed port 8090

Install

docker pull theenoro/szurubooru_to_booru_api

add enviroment variables

REDIRECTURL_INTERNAL_STACK="http://192.168.0.2:8090"
BASEURL_SZURUBOORU="http://192.168.0.2:5432"
DEBUG=1

Bare nodejs

Structure in this configuration

server:
    dockerHost:
        ip: 192.168.0.2
        # installed szurubooru with exposed port 8090
    nodejsHost:
        ip: 192.168.0.3
        # installed nodejs - (tested with nodejs 16)

Install

git clone https://github.com/Theenoro/szurubooru-to-booru-api
cd szurubooru-to-booru-api
npm install
nano .env

add enviroment variables to .env

REDIRECTURL_INTERNAL_STACK="http://192.168.0.2:8090"
BASEURL_SZURUBOORU="http://192.168.0.3:5432"
DEBUG=1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.