React nicely featured (Babel, Webpack, Redux) App, with Node/Express Backend, and Mongo Database all within Docker's container
Installation β’ Usage β’ Social Media Login β’ How to use β’ Technologies β’ Sources and Related
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 |
---|
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, [...] }
Refer to the Social Media Login chapter βοΈ π
$ docker-compose build
$ docker-compose up
https://localhost:3000
To use social media login, you have to follow few steps :
-
Submit to a developper account on the following websites :
-
Get CLIENT_ID and CLIENT_SECRET and place them in a server/.env file as
GOOGLE_KEY='' GOOGLE_SECRET=''
.
βββ 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)
- 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