Skip to content

Example CGI app using custom C++/V8 Javascript framework

Notifications You must be signed in to change notification settings

bhbdev/v8jstest

Repository files navigation

v8jstest


Project

This project provides a sample environment for developers to practice code exercises.

Requirements

Developer must have docker-compose installed.

Setup:

Clone the repo

git clone git@github.com:bhbdev/v8jstest.git v8jstest && cd v8jstest

To start up the project services (db,api,web) run this command in your terminal:

docker-compose up -d

To stop the services:

docker-compose down

Notes

  • The api service can be located at http://localhost:4100
  • The web service can be located at http://localhost:4200
  • The db service runs on port 5438

API endpoints

The api service app has the following endpoints setup to fetch and send data. Responses are in JSON format.

/getlists - returns all lists in the database

curl -Lv http://localhost:4100/getlists

/getcusts - returns all customers in the database

curl -Lv http://localhost:4100/getcusts

/getcust - This endpoint returns a customer by email

curl -Lv http://localhost:4100/getcust?email=bob@example.com

Accepted parameters: email

/subscribe - creates or updates new customers, subscribes or unsubscribes customers to a list.

Accepted parameters:

  • email
  • fname
  • lname
  • gender
  • lists list id or comma-delimted list of listids
  • unsubs list id or comma-delimted list of listids

/seed you can hit this endpoint http://localhost:4100/seed to load in 20 test subscribers

About

Example CGI app using custom C++/V8 Javascript framework

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published