Boilerplate code to make a fast GraphQL Apollo Server running on AWS Lambda interfacing with a MongoDB Database.
Just add in your models/resolvers and you are good to go! 😁
Clone this repository on your local machine
git clone https://github.com/JimiIT92/Lambda-Graphql-Boilerplate
Open the project in your favorite IDE or text editor (I suggest VSCode)
Once open, open a new terminal and install the project dependencies
npm install
Remember to rename the .env.example
file to .env
or make your own .env
file!
Since the project is intended to run on AWS Lambda, you need
Serverless Framework installed
to make it run on your local machine too.
Otherwise you need to change the src/app.js
code
to start a web server with Apollo.
Note that in this case you won't be able to deploy the service
to AWS Lambda, since Lambda can't run a normal Apollo Server.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Licensed under the MIT License. You are free to use, share and edit this code as you wish 😁