This project uses the Serverless framework. You can get started by following this guide.
You will need to following things set up before you can contribute to this project.
nvm use
Install all the things
npm install
For convenience install the AWS CLI. Then configure your new CLI by following this guide
Run npm run serverless offline start
npm run serverless -- invoke -f functionName -l
npm run serverless -- logs -f hello -s dev -t
Tail the logs on dev for function named hello.
npm run serverless -- deploy
npm run serverless -- deploy -f functionName -s dev
Deploys the function named functionName to the dev environment.
The default environment we use is dev so if you wanted to deploy to prod environment you would do -s prod
.
npm run serverless -- deploy -s prod
Simulate a form post which is what we are doing in jQuery when a user views a page.
Note: using HTTPie in these examples. You could use curl or Postman if you like. Note: You will need to update the URL to be the current one you are testing.
http --form POST http://someawsurl.com drupalNid='8741' contactId='003A000001FLKNxIAP' userId='44361' viewedAt='1528994519040'