Skip to content

Araxeus/opl-whatsapp-server

Repository files navigation

opl-whatsapp-server

The package manager for this project is bun

Dev mode

Install deps:

bun install

start the server on localhost using .env file:

bun start

Production

Build using:

bun install --production --frozen-lockfile && bun _build

Run using:

node ./dist/server.js

To disable testing mode set the environment variable TEST_MODE to off aka:

Bash:

export TEST_MODE=off

Dockerfile:

ENV TEST_MODE=off

Powershell:

$env:TEST_MODE = "off"

Requirements

  • Node.js latest
  • Bun latest
  • The following environment variables are required:
    • MONGODB_URI - The URI for the MongoDB database
    • USERID_SECRET - The secret for the user tokens
    • OPERATE_PHONE_NUMBER - Phone number of the service the server interacts with
    • OPENAI_API_KEY - The API key for OpenAI
    • REFRESH_KEY - The key for accepted for API calls to refresh active user sessions
  • The following environment variables are optional:
    • TEST_USERID - [Optional] The user ID for testing
    • TEST_MODE - set to off to disable testing mode
    • PORT - [Optional] The port the server listens on
    • HOST - [Optional] The host the server listens on

About

production server interacting with specific whatsapp service

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •