Membership / Book Price Service on Audible
The Price Service a component of a larger project to create a look-alike Audible Item Page built with a Service-Oriented Architecture. Price Service is a fullstack service that provides the price and membership information for an Audible item page.
Technologies Used:
- React
- Node.js
- Express
- MySQL
- AWS EC2
- Within the Item Page
- GET
/api/price/:bookId
- Given a
bookId
, retrieve its price.
- Given a
- GET
/api/price/:bookTitle
- Given a
bookTitle
, retrieve its price.
- Given a
- POST
/api/price
- Given a
book_id
,book_title
andprice
, creates a new record in database.
- Given a
- PATCH
/api/price/update
- Given a
book_id
andprice
, updates the price of the matching id.
- Given a
- DELETE
/api/price/:id
- Given a
book_id
, deletes the record of matching id.
- Given a
Note: Only available when EC2 instance is running. See deployed service here
Requirements:
- Node v14.15.0
- Follow instructions for your platform in this link
- Start MySQL:
mysql -u root -p
and enter password specified in step 1
- Within root directory, create a
.env
file:touch .env
- Open the file and add the
DB_USER
andDB_PASS
fields to access MySQL
- Within root directory, run
npm install
- Within root directory, create bundle file:
npm run react-prod
- Within root directory, launch server:
npm start
- Enable RESTful client with path parameters instead of query parameters
- Improve client accessibility