The finished version of the photo-share-api!
From this folder, run yarn or npm install to install the dependencies. Next, open your .env file and values for the DB_HOST, GitHub Authorization, and Apollo Engine.
DB_HOST=<YOUR_MONGODB_HOST>
CLIENT_ID=<YOUR_GITHUB_CLIENT_ID>
CLIENT_SECRET=<YOUR_GITHUB_CLIENT_SECRET>
ENGINE_API_KEY=<YOUR_ENGINE_API_KEY>
Finally you can start this service by running yarn start or npm start. Once started the service will be running on port 4000, and you can access the playground at http://localhost:4000/playground. Send your service a test query to make sure it works:
query {
totalUsers
totalPhotos
}Want to see the project running on Glitch instead?
Note: You'll still need to replace the values of the .env file with your unique variables.