demo-shopping-service

1.0.6 • Public • Published

Demo Shopping Service

AWS lambda function that provides wardrobe suggestions based on the current weather at a location.

Online Demo

Running Locally

The NPM package contains both the client and the server code. Install with: npm i demo-shopping-service

AWS Lambda Function (Service)

  1. Change directory to server: cd service

  2. Install the dependencies: npm install

  3. Run all tests: npm run test

Deploying Service on Your Own Amazon Web Services
  1. Create IAM user with API access and put the user in the "administrator" policy.

  2. Install the servrless NPM package

    npm i serverless -g

  3. Configure serverless credentials

    serverless config credentials --provider aws --key AKIAIOSFODNN7EXAMPLE --secret wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

  4. Deploy

    serverless deploy

  5. Run:

    serverless invoke -f suggest -l -p .\src\data\zipCode.json serverless invoke -f suggest -l -p .\src\data\zipCodeExtended.json serverless invoke -f suggest -l -p .\src\data\zipCodeInvalid.json

Client (Angular)

  1. Change directory to client: cd .\client
  2. Install the dependencies: npm install
  3. Run the client: ng serve
  4. Browse to http://localhost:4200

Technologies

  • Angular for demo client consumer
  • Chai for assertions and expectations in unit testing
  • DefinitelyTyped for Type Script definition files for existing npm packages.
  • Mocha for unit testing
  • TypScript for strongly typed JavaScript
  • Serverless for testing and deployment
  • Sinon for spies, mocks and stubs in unit testing
  • Webpack for compilation and bundling

Readme

Keywords

Package Sidebar

Install

npm i demo-shopping-service

Weekly Downloads

3

Version

1.0.6

License

ISC

Last publish

Collaborators

  • therunningdev