WPPConnect/WA-JS API SERVER is a small api server to provide url preview for @wppconnect/wa-js library
This project generate PNG images from JSON respose for URL preview.
Steps to run locally:
# checkout the project
git clone https://github.com/wppconnect-team/wa-js-api-server.git
# enter in the folder
cd wa-js-api-server
# if you want to get the updates
git pull
# install the depencencies
npm install
# build javascript files
npm run build
# if you want to change some configuration, you can set en ENVIRONMENT variables or copy the .env to .env.local
# cp .env .env.local
# lauch local server
node ./dist/server.js
# checkout the project
git clone https://github.com/wppconnect-team/wa-js-api-server.git
# enter in the folder
cd wa-js-api-server
# if you want to change some configuration, you can set en ENVIRONMENT variables or copy the .env to .env.local
# cp .env .env.local
# create container
docker-compose -f docker-compose.yml up --build -d
# checkout the project
git clone https://github.com/wppconnect-team/wa-js-api-server.git
# enter in the folder
cd wa-js-api-server
# create image
docker build -t wppconnect/wa-js-api-server:1.0.0 -f Dockerfile .
# create container
# if you want to change some setting you can set ENVIRONMENT variables
docker run -d -p 8000:8000 --name WPPconnectLinkPreview \
--restart=always \
-e NODE_ENV=production \
-e PORT=8000 \
-e LOG_FORMAT=combined \
-e LOG_DIR='./logs' \
-e ORIGIN='https://web.whatsapp.com' \
-e CACHE_MAX_ITEMS=500 \
-e CACHE_MAX_SIZE=104857600 \
-e CACHE_TTL=3600000 \
-e TRUST_PROXY=1 \
-e USER_AGENT='WhatsApp/2.2214.12 N' \
wppconnect/wa-js-api-server:1.0.0
Copyright 2021 WPPConnect Team
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.