GithubHelp home page GithubHelp logo

hisptz / chatbot-server Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 335 KB

A simple server that uses decision tree based algorithm to perform different actions based on the user selection

TypeScript 99.19% Dockerfile 0.35% Shell 0.46%

chatbot-server's Introduction

Chat bot Engine

Introduction

A simple server that uses decision tree based algorithm to perform different actions based on the user selection

Getting started

To set up the server, download the latest release. Then create copy the .env.example file to .env and change the required environment variables.

Environment variables

  • DATABASE_URL: The postgres database url for the server with the format postgres://user:password@server_name:port/db_name
  • POSTGRES_PASSWORD: The database password (Only applies to docker compose setup)
  • POSTGRES_USER: The database user (Only applies to docker compose setup)
  • PORT: The port where the server should run on.
  • API_MOUNT_POINT: The endpoint on which the server API will be accessible
  • API_KEY_ADMIN: An API key that every request must set in the header as x-api-key

Using node

This requires at least Node version 16.x.

Run

 yarn install --prod

To get required dependencies and run the app using the command:

yarn start

Using Docker (Recommended)

This requires at least Docker Engine version 23.0.5 and Docker Compose Plugin version v2.15.1. To run the app using docker there are 2 ways:

Docker build

First, build the docker image

docker build . <image_name>:<app-version>

And then run the app container using:

docker run <image_name>:<app-version> --port 3000:<port>

Make sure the DATABASE_URL points to an existing Postgres database

Docker compose

This is recommended if you don't have an external Postgres database. To run the app use:

docker compose up -d --build

Development

You can set up the project by cloning into your local machine.

Get dependencies

Get the required dependencies by running:

yarn install

Environment

Copy .env.example to .env file and change the variables as required.

Run in development mode

To run the server in development mode use:

yarn dev

Build

To build the app run:

yarn build

This will create a zipped build in the build folder

chatbot-server's People

Contributors

nnkogift avatar

Stargazers

 avatar

Watchers

 avatar  avatar

chatbot-server's Issues

Name changes

  • Change the project name to analytics messenger engine

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.