Windows NT WIN-F6SLGVICLOP 10.0 build 17763 (Windows Server 2016) AMD64
Microsoft-IIS/10.0
Server IP : & Your IP : 3.135.206.125
Domains :
Cant Read [ /etc/named.conf ]
User : elibrary.unsap.ac.id
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Lock Shell
Lock File++
Readme
D: /
localhost /
admission /
baileys-api-master /
Delete
Unzip
Name
Size
Permission
Date
Action
.github
[ DIR ]
drwxrwxrwx
2023-02-15 21:11
examples
[ DIR ]
drwxrwxrwx
2023-02-15 21:11
prisma
[ DIR ]
drwxrwxrwx
2023-02-15 21:11
src
[ DIR ]
drwxrwxrwx
2023-02-15 21:11
.env.example
191
B
-rw-rw-rw-
2023-02-15 21:11
.eslintignore
22
B
-rw-rw-rw-
2023-02-15 21:11
.eslintrc.js
422
B
-rw-rw-rw-
2023-02-15 21:11
.gitignore
61
B
-rw-rw-rw-
2023-02-15 21:11
.prettierignore
28
B
-rw-rw-rw-
2023-02-15 21:11
LICENSE
1.06
KB
-rw-rw-rw-
2023-02-15 21:11
README.md
2.94
KB
-rw-rw-rw-
2023-02-15 21:11
package.json
1.6
KB
-rw-rw-rw-
2023-02-15 21:11
postman_collection.json
119.84
KB
-rw-rw-rw-
2023-02-15 21:11
prettier.config.js
136
B
-rw-rw-rw-
2023-02-15 21:11
tsconfig.json
350
B
-rw-rw-rw-
2023-02-15 21:11
yarn.lock
118.9
KB
-rw-rw-rw-
2023-02-15 21:11
Save
Rename
# Baileys API An implementation of [@adiwajshing/Baileys](https://github.com/adiwajshing/Baileys) as a simple REST API with multiple device support ## Requirements - **NodeJS** version **14.5.0** or higher - **Prisma** [supported databases](https://www.prisma.io/docs/reference/database-reference/supported-databases). Tested on MySQL and PostgreSQL ## Installation 1. Download or clone this repo. If you want to skip the build step, you can download the prebuilt one (file with the `baileys-api-VERSION.tgz` name pattern) from the release page 2. Enter to the project directory 3. Install the dependencies ```sh # npm npm install # yarn yarn ``` 4. Build the project using the `build` script ```sh # npm npm run build # yarn yarn build ``` You can skip this part if you're using the prebuilt one from the release page ## Setup 1. Copy the `.env.example` file and rename it into `.env`, then update your [connection url](https://www.prisma.io/docs/reference/database-reference/connection-urls) in the `DATABASE_URL` field 1. Update your [provider](https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#fields) in the `prisma/schema.prisma` file if you're using database other than MySQL 1. Run your [migration](https://www.prisma.io/docs/reference/api-reference/command-reference#prisma-migrate) ```sh # npm npx prisma migrate (dev|deploy) # yarn yarn prisma migrate (dev|deploy) ``` or push the schema ```sh # npm npx prisma db push # yarn yarn prisma db push ``` Don't forget to always re-run those whenever there's a change on the `prisma/schema.prisma` file ## `.env` Configurations ```env # Listening Host HOST="localhost" # Listening Port PORT="3000" # Database Connection URL DATABASE_URL="mysql://root:12345@localhost:3306/baileys_api" # Reconnect Interval (in Milliseconds) RECONNECT_INTERVAL="5000" # Maximum Reconnect Attempts MAX_RECONNECT_RETRIES="5" # Maximum SSE QR Generation Attempts SSE_MAX_QR_GENERATION="10" # Pino Logger Level LOG_LEVEL="warn" ``` ## Usage 1. Make sure you have completed the **Installation** and **Setup** step 1. You can then start the app using the `start` script ```sh # npm npm run start # yarn yarn start ``` 1. Now the endpoint should be available according to your environment variables configuration. Default is at `http://localhost:3000` ## API Docs The API documentation is available online [here](https://documenter.getpostman.com/view/18988925/2s8Z73zWbg). You can also import the **Postman Collection File** `(postman_collection.json)` into your Postman App alternatively ## Notes - There's no authentication, you may want to implement your own. I don't want to force anyone into using a specific authentication method, choose whatever you love ## Notice This project is intended for learning purpose only, don't use it for spamming or any activities that's prohibited by **WhatsApp**