GithubHelp home page GithubHelp logo

news-app-be's Introduction

News App Backend

This example demonstrates how to run a service locally, using the serverless-offline plugin. It provides a REST API to manage Todos stored in a DynamoDB, similar to the aws-node-rest-api-with-dynamodb example. A local DynamoDB instance is provided by the serverless-dynamodb-local plugin.

Use-case

Test your service locally, without having to deploy it first.

Configure Credential

Linux: export AWS_ACCESS_KEY_ID=<KEY_ID> export AWS_SECRET_ACCESS_KEY=<ACCESS_KEY>

windows(powershell): setx AWS_ACCESS_KEY_ID <KEY_ID> setx AWS_SECRET_ACCESS_KEY <ACCESS_KEY>

serverless config credentials --provider aws --key --secret

npm install
serverless dynamodb install
serverless offline start
serverless dynamodb migrate (this imports schema)

Setup

npm install
serverless dynamodb install
serverless offline start
serverless dynamodb migrate (this imports schema)

Run service offline

serverless offline start

Usage

You can create, retrieve, update, or delete todos with the following commands:

FAQ

  • Did you use any bootstrap template? A. Yes, I have used serverless framework examples

  • Do we have linting ? A. Yes, Airbnb style guide. Moreover we can have husky And/or sonarqube

  • Do we test setup ? A. yes, using jest

  • why serverless ? A. Matches with the JD and currently working on same. It is cloud agonistic unlike AWS SAM

  • should we keep test files along with code js files or we should create a separate directory structure? A. As per me, unit test should present along with the code file

  • Will you keep database schema and api function in same yml file A. A Big NO, because database will deployed once. So I will keep infrastrcture like dynamodb and DAX in their separate files.

  • should we keep test files along with code js files or we should create a separate directory structure? A. As per me, unit test should present along with the code file and also I will add a folder called test to add postman files and environment for other users and help in creating cypress test cases.

  • What you will do for api testing? A. I will use cypress

Known Issue:

Lint script is not working as expected

news-app-be's People

Contributors

shashankgpt avatar

Watchers

James Cloos avatar  avatar

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.