(IaC using YML/Serverless & other π¦ magical stuff)
Please go to Gitlab Repo or use gitlab if you want to use free gitlab CI/CD instead of circleCI
Read more on :
- Medium post on setting this up
- Vist dasithsblog.com for other cool stuff.
- β‘ Serverless YML templates(Infrastucture As Code- IAC) that provide and provision dynamic/scalable resources like DynamoDb,S3,elastic search, lambda functions etc with a single command.
- π Support for Typescript.
- π An attempt at unit testablity and test coverage via Jest, this would be focused more heavily on later updates.
- π Attempts to focus on a simple development structure / flow.
- ποΈββοΈ Support for any amount of environments (Dev,Test,Production etc..) replications via Cloud formation templates.
- πΈοΈGraphQL api exposed via a single endpoint with the posiblilty to scale via step functions or otherwise in future.
- βοΈ CI/CD for all 3 environments (dev,test,production) via Gitlab CI/CD
- π Docker file / compose for running dynamodb offline on a docker container.
Clone project into your local folder.... & then navigate to project on terminal or Shell
npm install -g serverless
serverless config credentials --provider aws --key $AWS_ACCESS_KEY_ID --secret $AWS_SECRET_ACCESS_KEY
Note that the $AWS_ACCESS_KEY_ID and $AWS_SECRET_ACCESS_KEY here needs to be replaced by credentials given to you by project owner or you may create your own AWS account and IAM role / credentials for programatic access
Click here for more info !!!
Install GraphQL Playground optional for easy querying
npm install
npm install -g graphql-cli
npm run deploy-dev
npm start
To run it locally
Initially make sure you have completed steps in both Install & Pre-requisites and in Getting started
npm run deploy-dev
Copy URL to the lambda function that is output onto the terminal once above command is run
Then Open GraphQL Playground and Select "URL EndPoint" and paste the Copied URL there
Then Run
query {
listEvents {
id
name
}
}
To see if the GraphQL query works as inteded either by returning empty list or list of "events"
Read more on graphQL to learn Queries / Mutations to try out more queries againt the API