Skip to content

WayneGreeley/mysql-sam-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mysql-sam-app

SAM application with mysql

commands used to create this project

  • sam init sam init

  • npm install uuid --save

  • npm install serverless-mysql --save

  • sam build sam build

  • sam deploy --guided sam deploy

  • sam delete --no-prompts

  • test put-item

 POST: https://<YOUR_ID>.execute-api.us-east-1.amazonaws.com/Prod/
 {
    "id": "1",
    "name": "me"
}
 POST: https://<YOUR_ID>.execute-api.us-east-1.amazonaws.com/Prod/
{
    "id": "2",
    "name": "you"
}
  • test get-all-items
GET:  https://<YOUR_ID>.execute-api.us-east-1.amazonaws.com/Prod/
  • test get-by-id
GET:  https://<YOUR_ID>.execute-api.us-east-1.amazonaws.com/Prod/1
  • test get-all-sql-items
GET:  https://<YOUR_ID>.execute-api.us-east-1.amazonaws.com/Prod/allsql/

SQL to initially seed DB...

use myawesomedatabase; CREATE TABLE Persons ( userId INT, firstName VARCHAR(60), lastName VARCHAR(60) );

use myawesomedatabase; SELECT * FROM Persons;

use myawesomedatabase; insert into Persons (userId, firstName, lastName) values (1, 'foo', 'bar');

About

SAM application with mysql

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published