GithubHelp home page GithubHelp logo

harrytran998 / aws-realworld-starter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bakerstreet-industries/aws-realworld-starter

0.0 1.0 0.0 420 KB

Starter kit for new RealWorld framework implementations wanting to use Serverless with AWS as the provider; DynamoDB; SSM; JWT

Home Page: https://bakerstreet.industries

License: MIT License

JavaScript 1.61% TypeScript 98.39%

aws-realworld-starter's Introduction

AWS Serverless RealWorld Example App

Example Serverless+Typescript codebase that adheres to the RealWorld API spec and opinionated patterns of the aws-ts-starter.

Codacy Badge Build Status Coverage Status License: MIT serverless

How it works

aws-realworld-starter is a serverless seed written in Typescript that provides the following out of the box:

  • Follows The Repository Pattern
  • Structured in a way to have features carved out into microservices
  • Strives for 100% unit test coverage to encourage BDD/TDD
  • Fully functional end-to-end testing of the RealWorld API spec via a Serverless YAML
  • A default Repository implementation against a Dynamo DB
  • An AWS handler wrapper that takes care of the API Gateway callback and error handling, either by thrown errors or by caught promises

Getting started

  1. Fork / Clone this repository
  2. Install the AWS CLI - npm install -g aws
  3. Install the Serverless CLI - npm install -g serverless
  4. Run npm install in your working directory
  5. Configure your AWS CLI - aws configure with your aws_access_key_id and aws_secret_access_key
  6. Create a JWT signing secret in the AWS System Manager's Parameter Store:

TODO: Serverless Generator

Integrate with Travis CI

A .travis.yml file is already included for you. If you do not have a Travis CI account, go here. Once registered, activate your repository, navigate to settings, and add the following Environment Variables:

  1. AWS_ACCESS_KEY_ID
  2. AWS_SECRET_ACCESS_KEY

This seed uses AWS as the provider by default and these credentials are used to deploy and run your serverless application.

Integrate with Coveralls

A public place to display code coverage of your API. Add this Environment Variable to your Travis CI repository's settings:

  1. repo_token - Coveralls token for uploading code coverage report

Running the tests

Unit tests can be run via npm test. If you have never run the end to end tests, or have code changes that need to be deployed before running the end to end tests, use npm run test:e2e:deploy, otherwise to execute the end to end tests of what is deployed to your serverless provider, use npm run test:e2e.

Note: that when you run the deploy routine, it will run a gulp task that will automatically replace the token [[ENDPOINT]] in each e2e test file and replace it with the base URL of the deployed AWS api gateway.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.