To create a simple React app with GraphQL MongoDB database to be used as a template to develop websites quicker.
Starting a React website from scratch
How to use GraphQL with React
Deployed on Heroku here
- Description
- User Story
- Screenshots
- Installation
- Features
- Technology
- Contributors
- Acknowledgements
- Testing
- License
- Questions
Create a template for basic setup of a React SPA with a GraphQL backend.
Need to install MongoDB local server before trying to run this project, check the MongoDB documentation: https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-windows/
-
Clone the repo to your computer by clicking the green code button and copying the SSH version.
-
Open Gitbash in your desired folder and type
git clonethen right click to paste the string and hit enter. The repo will then be cloned to your computer. -
Navigate to the repo folder and type
code .into gitbash to open the repo in VS Code. -
Open a new Terminal in VS Code and type
npm installto install the repo dependencies. -
Create a .env file like the image below in the server folder and input your database details.
-
Install concurrently as dev dependency
npm i concurrently -Dat root folder -
Start your local MongoDB server by going to the location mongoDB was installed or opening Gitbash and cd ing to it.
The location path is usually similar to this:
C:\Program Files\MongoDB\Server\<server version number>\binThen type mongod into Gitbash and hit enter. This will start a local server.
-
Then open Mongo Compass and connect to the local server by typing:
mongodb://localhost:27017/ -
Finally, type
npm run developinto the terminal and it will start the dev server at localhost:3000.
- Can create an account, delete your account and update your details.
- User Authentication for profile and login routes.
- Login, signup, home, profile, about and contact pages.
- Express server already set up and ready to go.
- MongoDB database ready, change details in .env file to connect yours.
- Fontawesome icons used where appropriate.
- Express
- Heroku
- GraphQL
- React
- JWT
- MongoDB
- Bootstrap
You can also contribute by opening a pull request or submitting an issue.
Custom mongoDB error messages from Stack overflow
MongoDB error handling middleware
Background photo is by Geran de Klerk forest
Important: Code to kill port processes if something running on port 3000 error npx kill-port 3000, type into your VS Code terminal and hit enter, will kill port 3000 and let you run the app.
No tests yet
MIT
Copyright 2022 Zachary Hobba
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Find me on Github at HobbaZ
If this has helped you with your web development, consider buying me a Coffee (only costs $3) at zachobba
Email me at zachobba@gmail.com



