Skip to content

A simple boilerplate for creating Web Applications involving React, Express, Node, and MongoDB

Notifications You must be signed in to change notification settings

alexander-lee/MERN-boilerplate-lite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MERN Boilerplate (LITE)

A simple boilerplate for creating Web Applications involving React, Express, Node, and MongoDB

Getting Started

  1. Install Node.js

  2. Install MongoDB

    brew install mongodb (If you have Homebrew)

  3. Copy the Project Repo into your own directory

    git clone [email protected]:alexander-lee/MERN-boilerplate-lite.git

  4. Install all the Dependencies

    npm install

  5. Install Gulp globally

    npm install -global gulp-cli

  6. Start the Node Server

    npm start or gulp

Setting up the Database

  1. Create a Directory for MongoDB to live in (Create the folder /data/db at your root).

    mkdir -p /data/db

  2. Make sure your directory has the right permissions

    chmod 0755 /data/db && sudo chown $USER /data/db

  3. Before you start the Node Server, start your Mongo Process

    mongod --dbpath /data/db

  4. Create a Database (if you didn't make one yet)

    mongo

    use sampledb

  5. Add your Database to the configuration file (config.js)

    module.exports = {
        "development": {
            "db": "mongodb://localhost:27017/{YOUR DATABASE NAME}"
        }
    }
    
    

File Structure

  • /bin holds the Server Script (Don't Touch)
  • /public holds static/public files
  • /client is your Front-End (Client-side) React Components
  • /models holds all of your MongoDB models
  • /routes holds all of our Backend Routing
  • /styles is where you write your Sass (SCSS) files
  • /views is where you write your .ejs files (Including CDN scripts)

Useful Readings

About

A simple boilerplate for creating Web Applications involving React, Express, Node, and MongoDB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published