Git Product home page Git Product logo

oxytocin's Introduction

Oxytocin

Full-Stack Project for oxytocin

to run the server locally

  1. Clone the repository
git clone https://github.com/sourabh112/Oxytocin.git
cd Oxytocin
  1. Install the required node modules and dependencies
npm install
  1. Download the ngrock from https://ngrok.com/download
  2. Run the ngrock server
ngrock.exe http 5000
  1. Update the Twillio Whatsapp settings "WHEN A MESSAGE COMES IN" with the ngrock server url
  2. Download PostgresSql from https://www.postgresql.org/download/
  3. Create 2 tables using these commands in postgresql server or use GUI in shops_databse
CREATE TABLE IF NOT EXISTS public.cache_memory
(
    id text COLLATE pg_catalog."default" NOT NULL,
    name numeric NOT NULL,
    product numeric NOT NULL,
    inventory numeric NOT NULL,
    menu numeric NOT NULL,
    p_id text COLLATE pg_catalog."default" NOT NULL,
    CONSTRAINT cache_memory_pkey PRIMARY KEY (id)
);

CREATE TABLE IF NOT EXISTS public.shops
(
    id text COLLATE pg_catalog."default" NOT NULL,
    name text COLLATE pg_catalog."default" NOT NULL,
    CONSTRAINT shops_pkey PRIMARY KEY (id)
);
  1. Update the code lines according to your database settings :

    Oxytocin/script.js

    Lines 9 to 18 in 97ddbb0

    const db = knex({
    client: 'pg',
    connection: {
    host : 'localhost',
    user : 'postgres',
    port: '5432',
    password : 'Aabb11@@',
    database : 'shops_database'
    }
    });
  2. Finally run
npm start
  1. If something dosen't work you are welcomed to create a issue.

messenger.js only contains only dummy twillo Authentication and Account ID. Change them to your Authentication and Account ID in order to get your bot to work. And Start with activate your bot (In ngrock tutorial).

oxytocin's People

Contributors

sourabh112 avatar

Watchers

 avatar

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.