Skip to content

React nicely featured React App, with Node/Express Backend, and Mongo Database - (a bit deprecated 🚧)

License

Notifications You must be signed in to change notification settings

baylesa-dev/MERN-Boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

68 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MERN Boilerplate

React nicely featured (Babel, Webpack, Redux) App, with Node/Express Backend, and Mongo Database all within Docker's container

react version react version babel babel paypal

Installation β€’ Usage β€’ Social Media Login β€’ How to use β€’ Technologies β€’ Sources and Related

Installation

Prerequisites

Install docker and docker-compose

Due to the large number of available platforms I would refer you to theclear, clean and well explained Docker website.

πŸ‘‡ Follow the links above πŸ‘‡

Install Docker

Usage

Generate SSL Certificate

To run this project with HTTPS, and use Facebook Login feature, you have to generate certificates. You can follow this tutorial, created by Daksh Shah :

www.medium.freecodecamp.org/how-to-get-https-working-on-your-local-development-env...
$ mkdir -p MERN-Boilerplate/server/certs

And place your server.key, server.crt and server.csr under server/certs/

If you don't want to use HTTPS

  • in server/server.js and client/src/containers/Login.js comment/uncomment
    //const server = http.createServer(app)
    const server = https.createServer(certOptions, app)
    const certOptions = {
        ...
    }
    
    //const API_URL = "http://localhost:8080"
    const API_URL = "https://localhost:8080"
  • in client/config/webpack.base.config.js remove
    devServer: {
        https: true,
        [...]
    }
Want to use social media login ?

Refer to the Social Media Login chapter ✌️ πŸ‘‡

Build Docker's containers with
$ docker-compose build
Launch Docker's containers with
$ docker-compose up
Open your favorite browser on
https://localhost:3000
And that's it, you can code πŸ‘ πŸŽ‰
This is what you should see πŸ‘‡

Social Media Login

To use social media login, you have to follow few steps :

How to use

Architecture

.
β”œβ”€β”€ client                   # Client sources
β”‚   β”œβ”€β”€ config               # Webpack configuration files
β”‚   β”œβ”€β”€ src                  # Sources files
β”‚   β”‚   β”œβ”€β”€ action           #
β”‚   β”‚   β”œβ”€β”€ reducers         # Redux configuration files
β”‚   β”‚   β”œβ”€β”€ store            #
β”‚   β”‚   β”œβ”€β”€ components       # React components
β”‚   β”‚   β”œβ”€β”€ containers       # React containers
β”‚   β”‚   └── stylesheets      # SASS Styles files
β”‚   β”œβ”€β”€ .babelrc             # Babel configation file
β”‚   └── Dockerfile           # Client Dockerfile
β”œβ”€β”€ sever                    # Back-end sources
└── docker-compose.yml       # Docker Compose (client, backend, mongodb)

Client

Server

Technologies

  • MongoDB Open Source Document Database

    For giant ideas

  • Express Node.js web application framework

    Fast, unopinionated, minimalist web framework for Node.js

  • React A JavaScript library for building user interfaces

    Declarative, efficient, and flexible

  • Node.js JavaScript runtime built on Chrome's V8 JavaScript engine

    Designed to build scalable network applications

  • Docker Enterprise Container Platform

    Protect your legacy, invest in your future

Sources and Related

About

React nicely featured React App, with Node/Express Backend, and Mongo Database - (a bit deprecated 🚧)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published