🎬 Simple clone of The Movie DB built with Preact, Apollo, & Serverless
MIT License
The Mini Movie DB is a simple clone of The Movie DB built with Preact and GraphQL. It's an example application which runs inside of CodeSandbox with a back-end built to deploy to AWS Lambda.
I built The Mini Movie DB as part of a take-home coding challenge. You can use it as an example of how to build a simple Preact + GraphQL application! Have fun!
The best way to run this code is to simply open it in CodeSandbox!
There you can both see it in action and edit the code live in your browser.
If you'd like to play with the GraphQL API directly, here's a playground.
But what if I want to run this locally?
Well if you really want to do that, simply clone the repo and getting started is as easy as:
1. Install dependencies:
yarn
2. Run it!
yarn dev
That'll spin up both the api server and the front-end. As a bonus, the dev
script opens a playground for you automatically. You can reach the front-end at: http://localhost:8080/
Yeah! If you're running this locally, you'll need to get a few things for different parts to work:
serverless.env.yml
with the following key: movieDBApiKey: "<YOUR_API_KEY_HERE>"
apikey
environment variable inside your Lambda settings, here's a guide.And here's some other commands you can run:
yarn start
: Starts the server and the client without opening a playgroundyarn deploy:dev
: Deploys the api server to AWS to the development stageyarn deploy:prod
: Deploys the api server to AWS to the production stageyarn test
: Runs unit tests for both the server and the clientEverything here is released as-is, without support. PRs for bug fixes are appreciated, but there are no plans to maintain this project. Hope you find it useful!