This project provides a sample environment for developers to practice code exercises.
Developer must have docker-compose installed.
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
- 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
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:
- 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