Skip to content

SILVA-DIGITAL/genesis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Genesis

A dockerised create-react-app that stores data express server with GraphQL to connect to a MongoDB database. The application allows the user to add clients, projects and view sample_airbnb data from mongo atlas.

Features

  • Dockerised
  • Frontend built with create-react-app, graphql, mongoose, apollo
  • Backend built with express, graphql, mongodb

Stack

Docker Express Reactv17 Express MongoDB GraphQL

Install

  1. Install Docker for your operating system.
  2. Install the Docker Compose tool.
  3. Create a mongoDB Atlas account.
  4. Create a database on a mongoDB Atlas cluster with provided mongoDB sample_data.
  5. Copy and paste the mongoDB connection string into a .env file in server
  6. Run docker-compose up

ENV example

NODE_ENV = 'development' #Toggles if we show GraphiQL for dev or production#Port for the client
NODE_PORT = 5002 #Port for the server
MONGO_URI_ATLAS = 'mongodb+srv://<mongodbuser>:<mongodbpassword>@genesis.xsdlwrf.mongodb.net/sample_airbnb?retryWrites=true&w=majority' #Remote URI
MONGO_URI_LOCAL = 'mongodb://localhost:27017/sample_airbnb' #Local URI

Usage

docker-compose up

Alternatively you could cd into 'client' and 'server' then run the below to run the projects as normal outside of docker.

yarn && yarn start

To run the applications outside of docker.

About

An express server with GraphQL to connect to a MongoDB database

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •