Skip to content
A serverless GraphQL API built with TypeScript and MongoDB
TypeScript
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
api
src Fix resolver for Data Time Nov 20, 2019
.gitignore Initial commit Nov 12, 2019
README.md Updated README Nov 12, 2019
now.json Initial commit Nov 12, 2019
package.json Update dependencies Nov 23, 2019
yarn.lock Update dependencies Nov 23, 2019

README.md

Serverless GraphlQL API Example

Example Deployment

A serverless GraphQL API built with TypeScript and MongoDB

Local Development

The Now CLI will need be downloaded, installed and logged into.

After that create a .env file and add the DB_PATH environment variable with the database URI.

DB_PATH=mongodb://<user>:<password>@ds123456.mlab.com:54321/example-db

Finally run

now dev

Deploying to Zeit

First create a Now Secret with the name serverless-graphql-api-example-dp-path which has the database URI.

now secrets add serverless-graphql-api-example-dp-path "mongodb://root:root1user@ds021356.mlab.com:21356/serverless-graphql-api-example"

Then just deploy!

now
You can’t perform that action at this time.