peterdurham / mern-starter

:trophy: Simple MERN Stack Starter with Auth (Node, Express, MongoDB, React, Webpack)

Home Page:https://peaceful-earth-12146.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🏆 MERN Stack Starter

Full-stack project starter for MongoDB, Express, React, Node (MERN)

This app is deployed here (heroku free tier, ~5-10sec load)

Features:

  • Node Express server
  • React Webpack client
  • Authentication (register, login, logout)
  • Messages example: Create (private), Read (public)

Instructions

To get started, clone this repository and run

npm install

Next, add a keys_dev.js file to the src/server/config folder with

module.exports = {
  mongoURI: "<MongoDB-URI-Connection-String-Goes-Here>",
  secretOrKey: "secret",
};

replacing mongoURI above with your connection string for MongoDB (mlab, atlas, etc)

Run Locally

Start the project on port's 3000 and 8080 with

npm run dev

Heroku Setup

Once you've signed up for Heroku, login using

heroku login

Next, create a new project with

heroku create

Visit this project on the Heroku platform and head to the Settings >> Reveal Config Vars. Add the following variables

  • MONGO_URI: your mongodb connection string
  • NPM_CONFIG_PRODUCTION: false
  • SECRET_OR_KEY: secret

Heroku Deploy

The project is ready to deploy with

git init
git add .
git commit -m "initial commit"
git push heroku master

Tools

This project:

  • was built using Node for the server
  • uses Express for backend routing
  • uses Mongoose for database connection
  • uses Passport for Auth/login
  • uses Bcryptjs for password cryptography
  • uses Validator for serverside validation
  • was built using React for the client
  • uses Webpack for bundling files and assets
  • uses React Router for frontend routing
  • uses Babel for transpiling React code
  • uses ESLint for lint checking

About

:trophy: Simple MERN Stack Starter with Auth (Node, Express, MongoDB, React, Webpack)

https://peaceful-earth-12146.herokuapp.com/


Languages

Language:JavaScript 94.5%Language:CSS 4.0%Language:HTML 1.5%