diff --git a/.deepsource.toml b/.deepsource.toml deleted file mode 100644 index 992539ca..00000000 --- a/.deepsource.toml +++ /dev/null @@ -1,9 +0,0 @@ -version = 1 - -[[analyzers]] -name = "shell" -enabled = true - -[[analyzers]] -name = "javascript" -enabled = true \ No newline at end of file diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 36cbf2f0..a8f1b26f 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -38,11 +38,11 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -53,7 +53,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v2 # ℹ️ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -67,4 +67,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 diff --git a/Dockerfile b/Dockerfile index 1941d9bb..5692da32 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ -FROM node:16.13.0 +FROM node:16.15.0 +FROM node:18.2.0 RUN apt-get update RUN apt-get upgrade -y RUN apt-get install nodejs -y diff --git a/Procfile b/Procfile new file mode 100644 index 00000000..f27af839 --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web:node index.js diff --git a/README.md b/README.md index fe1ca0f1..92ff80a9 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,99 @@ +

REST API FREE

+

- + +
+ +
+ + +

+ +--- + +## GitHub Stats +

- + + + + + + +

+ +--- + +## Description + + This is a **free REST API** project maintained by **Sekha**. + + Easy to use, modify, and deploy anywhere. + + Star it if you like it! + +--- + +## How To Deploy on vercel + +```bash +please change NODEJS version to 20× +add enviroment npm insall +add enviroment yarn install +add enviroment node index.js +add enviroment mongodb Url +``` + + +## How To Install On Terminal + +```bash +apt update +apt upgrade +git clone https://github.com/inirey/API-REST +yarn install +node index.js +``` + + + +## Features + +- Downloader +- 18 + Content scraaper +- Anime Random Image +- Games +- Other & Open Source + +--- + +## Deployment + +✅ Latest: **Vercel Support ✨** +✅ Latest: **Railway Support ✨** +✅ Latest: **Heroku Support ✨** +✅ Latest: **Testing Github codespace ✨** +🕒 Updated: **Latest ago** + +--- + +## Contributors + +Thanks to all the amazing contributors who helped improve this project! +Wanna join the squad? Submit a PR! 🚀 + +--- +## Group Discussion WhatsApp + + +[Join Here ✨](https://chat.whatsapp.com/GkF9CmF3BXwLUrzgMaQUgu) + +## Stay Connected +

- -

-

- -

-

- - - - - + +
+ Happy Coding! 💻✨

diff --git a/database/db.js b/database/db.js index d7c3462f..1282ae9f 100644 --- a/database/db.js +++ b/database/db.js @@ -3,16 +3,16 @@ var __path = process.cwd(), { color } = require(__path + '/lib/color.js') // Connection URL -var url = 'https://api.reysekha.xyz'; +var url = 'https://api.sekha.me'; try { -if(url == 'https://api.reysekha.xyz') throw console.log(color('Cek konfigurasi database, var url belum diisi','red')); +if(url == 'https://api.sekha.me') throw console.log(color('Cek konfigurasi database, var url belum diisi','red')); } catch (e) { return; } var db = monk(url); db.then(() => { - console.log(color('Connected correctly to server, ZhirrrGanss','green')) + console.log(color('Connected correctly to server, oke','green')) }) .catch ((e) => { console.log(color('Error : '+ e +'\n\nGagal connect ke database, \ncek configurasi database apakah Connection URL sudah benar','red')) diff --git a/index.js b/index.js index 226d6a53..38f18d5a 100644 --- a/index.js +++ b/index.js @@ -7,8 +7,8 @@ var express = require('express'), const PORT = process.env.PORT || 8080 || 5000 || 3000 var { color } = require('./lib/color.js') -var mainrouter = require('./routes/main'), - apirouter = require('./routes/api') +var mainrouter = require('./system/main'), + apirouter = require('./system/api') var app = express() app.enable('trust proxy'); diff --git a/package.json b/package.json index fe18d388..dde08852 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,14 @@ { - "name": "api-rey", + "name": "API-REST", "version": "1.1.0", - "description": "My Rest Api", + "description": "turu", "main": "node index.js", "scripts": { "start": "nodemon index.js" }, "repository": { "type": "git", - "url": "git+https://github.com/inirey/RESTAPI.git" + "url": "git+https://github.com/inirey/API-REST.git" }, "keywords": [ "simple", @@ -16,22 +16,27 @@ "rest", "api" ], - "author": "skh", + "author": "Reyganz", "license": "ISC", "bugs": { - "url": "https://github.com/inirey/RESTAPI/issues" + "url": "https://github.com/inirey/API-REST/issues" }, "dependencies": { - "axios": "^0.26.0", + "axios": "^0.21.1", "base-64": "^1.0.0", "base32": "0.0.6", - "chalk": "^5.0.0", + "chalk": "^4.1.0", "cheerio": "^1.0.0-rc.5", "child_process": "^1.0.2", + "facebook-video-link": "^1.0.2", "cors": "^2.8.5", - "dotenv": "^16.0.0", - "emoji-api": "^1.0.2", - "skh-api": "^1.0.0", + "tiktok-scraper-without-watermark": "^1.1.2", + "path": "^0.12.7", + "dotenv": "^8.2.0", + "canvacord": "^5.2.1", + "canvas": "^2.8.0", + "canvas-hikki": "github:ZyxMapLe/canvas-hikki", + "emoji-api": "^2.0.0", "express": "^4.17.1", "fbdl-core": "^1.0.2", "form-data": "^4.0.0", @@ -40,18 +45,20 @@ "instatouch": "^2.3.3", "lodash": "^4.17.20", "moment": "^2.29.1", - "mongodb": "^4.0.0", + "mongodb": "^3.6.3", "monk": "^7.3.3", "morgan": "^1.10.0", - "needle": "^2.6.0", - "node-fetch": "^3.0.0", + "needle": "^3.0.0", + "node-fetch": "^2.6.1", "nodemon": "^2.0.7", "request": "^2.88.2", "ssl-express-www": "^3.0.7", + "skh-api": "^1.0.0", "tiktok-scraper": "^1.4.12", "urlencode": "^1.1.0", + "skh-api": "2.1.1", "api-rey": "1.1.0", "zrapi": "0.0.6" }, - "homepage": "https://github.com/inirey/RESTAPI#readme" + "homepage": "https://github.com/inirey/API-REST#readme" } diff --git a/renovate.json b/renovate.json deleted file mode 100644 index f45d8f11..00000000 --- a/renovate.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": [ - "config:base" - ] -} diff --git a/routes/api.js b/system/api.js similarity index 96% rename from routes/api.js rename to system/api.js index 3d41afc2..507e97b8 100644 --- a/routes/api.js +++ b/system/api.js @@ -9,9 +9,6 @@ var zahirr = db.get("zahirr"); } var creator = "Rey" -var neoxr = "yntkts" -var zeks = "administrator" -var zeks2 = "apivinz" var secure = require('ssl-express-www'); var cors = require('cors'); var fetch = require('node-fetch'); diff --git a/routes/main.js b/system/main.js similarity index 98% rename from routes/main.js rename to system/main.js index 6f81cfd5..f56dce5a 100644 --- a/routes/main.js +++ b/system/main.js @@ -1,3 +1,5 @@ +// Main + __path = process.cwd() var express = require('express'); diff --git a/vercel.json b/vercel.json new file mode 100644 index 00000000..95c5de44 --- /dev/null +++ b/vercel.json @@ -0,0 +1,11 @@ +{ + "version": 2, + "builds": [{ + "src": "index.js", + "use": "@vercel/node" + }], + "routes": [{ + "src": "/.*", + "dest": "/" + }] +} diff --git a/views/docs-1.html b/views/docs-1.html index 205e2056..3a2f3ec6 100644 --- a/views/docs-1.html +++ b/views/docs-1.html @@ -1,18 +1,19 @@ - + + - Rey API's - + Rey + - + @@ -20,8 +21,8 @@