Git Product home page Git Product logo

my-serverless-challenge's Introduction

Serverless Challenge

Acesso as Rotas

Existe um documento chamado "my-serverless-challenge.postman_collection.json" que possui todas as rotas gravadas e que podem ser testadas no postman

GET /healthCheck - Verifica se a aplicação está up

POST /funcionarios - Cria novo funcionário

GET /funcionarios - Lista todos os funcionários da base

GET /fucionarios/:id - Busca funcionário pelo id

PUT /funcionarios/:id - Atualiza funcionário baseado no id

DELETE /funcionarios/:id - Deleta funcionario baseado no id

Formato do body do request

Abaixo deixo um exemplo para o body da request necessário para o POST

{ "id":3454, "nome":"Matheus", "cargo":"Administrador", "idade":30 }

O PUT não precisa de id na requisiçao pois ja existe como parametro na url

/funcionarios/3454

{ "id":3454, "nome":"Matheus", "cargo":"Administrador", "idade":30 }

Testes locais

Para realizar testes locais será necessário algumas etapas

Etapas

npm i #para instalar as dependencias

npm i serverless -g #para instalar o serverless globalmente na maquina local

#Se windows recomendo utilizar git bash em vez de PowerShell

serverless login #é necessário estar logado no serverless

serverless config credentials --provider aws --key 1234 --secret 5678 #configurar credenciais AWS

sls dynamodb install #instalar dynamodb localmente

sls offline start #rodar app localmente

my-serverless-challenge's People

Contributors

mspolycarpo avatar

Watchers

 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.