Code Monkey home page Code Monkey logo

aws-lambda-pntp's Introduction

AWS Lambda, JWT Auth, CRUD users, MongoDB DynamoDB

for the starter make sure to install:

npm i -g serverless

To start git clone this repo, then run

npm install
#OR
yarn

to test locally run

sls offline start

to deploy to AWS run

sls deploy

to test AWS live

### test hello world and create superadmin users
POST https://s63wiiq38f.execute-api.ap-southeast-3.amazonaws.com/dev/hello
Content-Type: application/json;charset=UTF-8

{
  "name": "sancoLgates"
}

### login return token, unfortunately can't implement token in every API call yet
POST https://s63wiiq38f.execute-api.ap-southeast-3.amazonaws.com/dev/users/dev/auth/login
Content-Type: application/json;charset=UTF-8

{
  "name": "sancoLgates",
  "password": "password123"
}

### get all users
GET https://s63wiiq38f.execute-api.ap-southeast-3.amazonaws.com/dev/users

### create user
POST https://s63wiiq38f.execute-api.ap-southeast-3.amazonaws.com/dev/user
Content-Type: application/json;charset=UTF-8

{
  "name": "sanz",
  "password": "passwd",
  "status": true
}

### get user by id
GET https://s63wiiq38f.execute-api.ap-southeast-3.amazonaws.com/dev/user/9424fb24-914d-42f5-81c4-963cdc885d27
Content-Type: application/json;charset=UTF-8

### update user
PUT https://s63wiiq38f.execute-api.ap-southeast-3.amazonaws.com/dev/user/9424fb24-914d-42f5-81c4-963cdc885d27
Content-Type: application/json;charset=UTF-8

{
  "status": false
}

### delete user
DELETE https://s63wiiq38f.execute-api.ap-southeast-3.amazonaws.com/dev/user/9424fb24-914d-42f5-81c4-963cdc885d27
Content-Type: application/json;charset=UTF-8

aws-lambda-pntp's People

Contributors

sancolgates 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.