An e-commerce application built on SOA principles allowing users to find and purchase products
Start the server (port 4000) -
npm start
Bundle with webpack (watch mode) -
npm run build
Seed SQL DB (PostgreSQL) -
npm run seed-sql
Seed NoSQL DB (CouchDB) -
npm run seed-nosql
Run stress tests (artillery.io) -
npm run stress-test-get
npm run stress-test-post
Clean the DB out after testing (deletes every record with ID over 10,000,000) -
npm run clean-db
- POST
Endpoint: "/product-features" Required body: record to insert Response: Will return 200 if successul, 500 unsuccessful
- GET
Endpoint: "/product-features/:id" Required body: NA Response: Will return 200 and response data if successul, 500 if unsuccessful Response data format: { productId: INTEGER, banner: OBJECT, features: ARRAY, featureSetup: OBJECT, additionalFeatures: OBJECT }
- PUT
Endpoint: "/product-features/:id" Required body: productId to update, JSON of updates to make in this format - { productId: product_id, updates: { updates_to_make }} Response: Will return 200 if successul, 500 if unsuccessful
- DELETE
Endpoint: "/product-features/:id" Required body: productId to delete Response: Will return 200 if successul, 500 if unsuccessful
An nvmrc
file is included if using nvm.
- Node 6.13.0
- Postgres 13.2
- CouchDB 3.1.1
From within the root directory:
npm install -g webpack
npm install -g nodemon
npm install