This repository is part of a tutorial to deploy a MERN application using Heroku. You can read more about it in the blog post. It contains a basic full-stack application which allows users to submit a quote with a form. All the quotes will be displayed in the web application.
- client/src:
- components : React components for the user interface
- pages
- index.js : point of entry, also known as server.
- routes : includes the API end points definition
- models : Mongoose database Schemas
POST /quotes/post
- create a new document containing a quote and the corresponding author.GET /quotes/get
- get all the quotes from the database.
Run the following commands:
$ git clone https://github.com/hawa-bah/deploy-mern
$ npm install
$ cd client
$ npm install
- Make ".env" file
- Add MONGO_STRING
MONGO_STRING = 'mongodb+srv://<username>:<password>@cluster0.1a7yh.mongodb.net/<collectionName>?retryWrites=true&w=majority'