Skip to content

KatowProject/manga-reader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Manga Reader

Manga Reader with many sources (Komikindo, Mangabat)

Rest-API Installation

  1. Require Node.js 14.x.x;
  2. type npm install on terminal;
  3. type node . to running web server;

Rest-API Docs

Clik this

Web Installation

  1. Install Nginx in WSL/Linux
  2. Install php & php7.4-fpm
  3. edit nginx config
# Default server configuration
#
server {
	listen 80 default_server;
	listen [::]:80 ipv6only=on default_server;

	# SSL configuration
	#
	# listen 443 ssl default_server;
	# listen [::]:443 ssl default_server;
	#
	# Note: You should disable gzip for SSL traffic.
	# See: https://bugs.debian.org/773332
	#
	# Read up on ssl_ciphers to ensure a secure configuration.
	# See: https://bugs.debian.org/765782
	#
	# Self signed certs generated by the ssl-cert package
	# Don't use them in a production server!
	#
	# include snippets/snakeoil.conf;

	root /home/kato/manga-reader/web;

	# Add index.php to the list if you are using PHP
	index index.php;

	server_name _;

		rewrite /login /login.php last;
		rewrite /logout /logout.php last;

	location /komikindo {
                try_files $uri $uri/ =404;
				
		rewrite /search/page/(.*)$ /komikindo/index.php?p=$1 last;
		rewrite /chapter/(.*)$ /komikindo/index.php?c=$1 last;
		rewrite /favorite /komikindo/index.php?f=a last;
        }

	location /mangabat {
		try_files $uri $uri/ =404;
				
		rewrite /search/(.*)$ /mangabat/index.php?s=$1 last;
		rewrite /chapter/(.*)$ /mangabat/index.php?c=$1 last;
		rewrite /favorite /mangabat/favorite.php last;
	}

	location /otakudesu {
		try_files $uri $Uri/ =404;

		rewrite /search/(.*)$ /otakudesu/index.php?s=$1 last;
		rewrite /eps/(.*)$ /otakudesu/index.php?c=$1 last;
	}
	
	# API

	location ~ ^/api/(.*)$ {
		proxy_pass http://127.0.0.1:4873/api/$1;
		proxy_set_header Host $host;
		proxy_set_header X-Real-IP $remote_addr;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
	}
	
	location ~ ^/komikindo/api/(.*)$ {
		proxy_pass http://127.0.0.1:4873/komikindo/api/$1;
		proxy_set_header Host $host;
		proxy_set_header X-Real-IP $remote_addr;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
	}

	location ~ ^/mangabat/api/(.*)$ {
		proxy_pass http://127.0.0.1:4873/mangabat/api/$1;
		proxy_set_header Host $host;
		proxy_set_header X-Real-IP $remote_addr;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
	}

	location ~ ^/otakudesu/api/(.*)$ {
		proxy_pass http://127.0.0.1:4873/otakudesu/api/$1$is_args$args;
		proxy_set_header Host $host;
	}

	# pass PHP scripts to FastCGI server
	#
	location ~ \.php$ {
		fastcgi_pass unix:/run/php/php7.4-fpm.sock;
		fastcgi_intercept_errors on;
		fastcgi_index index.php;
		fastcgi_split_path_info ^(.+\.php)(.*)$;
		include fastcgi_params;
		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
	}

	# deny access to .htaccess files, if Apache's document root
	# concurs with nginx's one
	#
	#location ~ /\.ht {
	#	deny all;
	#}
}
  1. Run Nginx and php7.4-fpm
  2. open url localhost/ in browser

How to create Account

  1. cd path to rest-api/
  2. run node terminal
  3. type per step like this
> const db = require('quick.db');
> const tb = new db.table('account');
> tb.set('username', { username: 'username', password: 'password' ,user_id: 'user_id', favorites: [] });

Login Page

Home Page

enter image description here

Search

Manga Detail

Read Manga