A simple GraphQL API to serve data to a Q&A component of a front-end retail portal
- Node.js - version 14.5.2
- Apollo-Server-Express - version 2.19.1
- GraphQL - version 15.4
- Mongoose - version 5.11.8
- MongoDB - version 4.4.2
- Docker - version 20.10.1
- Docker-Compose - version 1.27.4
Create .env file in the root directory with the following variables:
- PORT: The port through which our API will listen to calls
- URL: The database URL in the following form
mongodb://localhost:27017/DB_NAME
- If running with 'npm start' commandmongodb://DB_USER:DB_PASSWORD@mongo_qa:27017/DB_NAME
- If running with 'docker-compose up -d' command
- DB_USER: Defines root database user on first run
- DB_PASSWORD: Defines root database password on first run
After creating the .env file, execute the following commands from the console:
- npm install to install project dependencies
- npm start to instantiate the service locally
or - docker-copose up -d to instantiate docker containers for server and database
Project is: finished
Denis Sanches - feel free to get in touch!