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/README.md b/README.md index 5a595ec4..92ff80a9 100644 --- a/README.md +++ b/README.md @@ -1,16 +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 b1335ccd..dde08852 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "sekha-ganteng", + "name": "API-REST", "version": "1.1.0", "description": "turu", "main": "node index.js", @@ -8,7 +8,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/inirey/RESTAPI.git" + "url": "git+https://github.com/inirey/API-REST.git" }, "keywords": [ "simple", @@ -16,10 +16,10 @@ "rest", "api" ], - "author": "Zhirrr", + "author": "Reyganz", "license": "ISC", "bugs": { - "url": "https://github.com/inirey/RESTAPI/issues" + "url": "https://github.com/inirey/API-REST/issues" }, "dependencies": { "axios": "^0.21.1", @@ -36,7 +36,7 @@ "canvacord": "^5.2.1", "canvas": "^2.8.0", "canvas-hikki": "github:ZyxMapLe/canvas-hikki", - "emoji-api": "^1.0.2", + "emoji-api": "^2.0.0", "express": "^4.17.1", "fbdl-core": "^1.0.2", "form-data": "^4.0.0", @@ -48,7 +48,7 @@ "mongodb": "^3.6.3", "monk": "^7.3.3", "morgan": "^1.10.0", - "needle": "^2.6.0", + "needle": "^3.0.0", "node-fetch": "^2.6.1", "nodemon": "^2.0.7", "request": "^2.88.2", @@ -56,8 +56,9 @@ "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/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 cb3ebef8..3a2f3ec6 100644 --- a/views/docs-1.html +++ b/views/docs-1.html @@ -9,7 +9,7 @@ - Erza + Rey @@ -22,7 +22,7 @@