emmebravo / switchboard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage

Built With

(back to top)

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

This project was created with yarn@3.2.2, please ensure you're using the correct yarn version

  • install yarn if you don't have it
    npm install -g yarn
  • go into this project and run
    yarn set version berry

Installation

  1. Clone the repo

    git clone https://github.com/emmebravo/switchboard.git
  2. Install NPM packages

    yarn install
  3. To run the server

    yarn dev
  4. To run the client, make sure you're in the right folder

    cd client
    yarn dev

IMPORTANT

  • The frontend and backend are not running concurrently
  • I've done two things which are vulnerabilities, but I felt necessary to make running this repo as smooth as possible.
    1. I've included the mongodb connection string in the config/database.js file as I've seeded the CSV data already.
    2. The USERNAME & PASSWORD for express-basic-auth used in the /actblue_webhook endpoint are not hidden, either
      • they're the same as the APPENDIX A username & password

(back to top)

Up & Running

  • Server can be the only one running to send a POST request to the /actblue_webhook endpoint
  • React will not display the data unless the server is running
    • they aren't running concurrently, sorry!

Webhook POST Request

  • the webhook post endpoint is not accessible via React. I treated it as if it was only accessible by an actual service sending a webhook

  • it was tested with Postman's API:

    screenshot showing basic auth username and password screenshot showing the json object and 200 status

(back to top)

About


Languages

Language:JavaScript 90.4%Language:CSS 8.3%Language:HTML 1.3%