https://github.com/eduardozepeda/graphql-mongo-db-api
A small practice to test mongodb and graphql basic functions
https://github.com/eduardozepeda/graphql-mongo-db-api
dotenv graphql mongodb nodejs
Last synced: 2 months ago
JSON representation
A small practice to test mongodb and graphql basic functions
- Host: GitHub
- URL: https://github.com/eduardozepeda/graphql-mongo-db-api
- Owner: EduardoZepeda
- License: mit
- Created: 2021-09-30T00:15:26.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-10-08T18:29:24.000Z (over 4 years ago)
- Last Synced: 2025-08-03T03:29:44.555Z (11 months ago)
- Topics: dotenv, graphql, mongodb, nodejs
- Language: JavaScript
- Homepage: graphql-mongo-db-api.vercel.app
- Size: 130 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Graphql Mongodb API
## Demo
This is a basic class enrollment app it allows the creation of courses, students an monitors.
The project consist of a backend graphql endpoint running on vercel and express, using mongodb as the database.
It consist of two endpoints:
* [Graphiql console, docs included](https://graphql-mongo-db-api.vercel.app/api/graphql)
* [Api (Graphiql console deactivated)](https://graphql-mongo-db-api.vercel.app/api)
## Installation
Install with npm
```bash
git clone https://github.com/EduardoZepeda/graphql-mongo-db-api
cd graphql-mongo-db-api/
npm install
```
This project requires a .env file at the root of the project with the following environmental variables. The file will be loaded using the [dotenv](https://www.npmjs.com/package/dotenv) package.
DB_USER=yourDatabaseUser
DB_PASSWD=yourDnPassword
DB_HOST=your.cluster.mongodb.net
DB_NAME=yourDatabaseName
## Docs
Please refer to the [automatic graphiql docs](https://graphql-mongo-db-api.vercel.app/api/graphql) and click on the right upper corner.