Giter VIP home page Giter VIP logo

serverless-polly-proxy-api's Introduction

STOREVER BACKEND NODEJS

Run Locally

  1. Run npm install
  2. Add aws credential to .aws folder If you don't have it, ask your colleagues
  3. Run npm install-dynamodb
  4. If you’re stuck on the install for a few minutes,
    1. you can open: http://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.tar.gz directly from browser and download the gzip file
    2. Unzip the files into the ./dynamodb folder at the root folder of the project
  5. Run npm run offline
    1. If you’re on Mac, you might need to go into “preference” -> “privacy” to allow dynamo process to execute

Run the test

npm run test

To Deploy.

Just create a pull request from your feature-branch to the develop branch. After the pull request is accepted it will be automatically deployed to the dev environnement.

When you merge develop to master, it will be automatically deployed to the prod environnement .

Generate Schema AJV (if you don't want do it manually)

To check if our json object are correct we use https://ajv.js.org/

We need to have a json schema to compare it, you can write then manually or generate them here:

npx ts-json-schema-generator --path "src/models/**/*.ts"  -o "src/models/schema.json"

Continous Deployement

For deployment to AWS, we use the Serverless Framework https://www.serverless.com/

All the config files are in the folder ./serverless

If you deploy from your local machine (absolutely not recommended), we suppose that you have created an AWS profile like explain here: https://www.serverless.com/framework/docs/providers/aws/guide/credentials#using-aws-profiles and that your credentials allows you to deploy

All Continous deployement is setup in CodeBuild https://console.amazonaws.cn/codesuite/codebuild/home?region=cn-north-1 and that will use the ./buildspec.yml. So if you don't want use CodeBuild all the deployement instructions are in the ./buildspec.yml file

In CodeBuild add the environnement variable for each deployement:

  • STAGE : dev / prod

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.