Skip to content

brett-buskirk/mern-social

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MERN Social

A social networking application built using the MERN stack (MongoDB, Express.js, React, Node.js).

Project Structure

  • mern-social/ - Root directory
    • social_frontend/ - Contains the React frontend code
    • social_backend/ - Houses the Express.js backend server

Prerequisites

  • Node.js and npm: Make sure you have Node.js and npm installed on your machine.
  • MongoDB: You'll need a running MongoDB instance.

Getting Started

  1. Clone the repository:

    git clone https://github.com/brett-buskirk/mern-social.git
    cd mern-social
    
  2. Install dependencies:

    • Frontend:

      cd social_frontend
      npm install
    • Backend:

      cd ../social_backend
      npm install
  3. Set up environment variables:

    Create a .env file in the social_backend directory.

    touch .env

    Add your MongoDB connection string and any other necessary configuration variables.

    Example .env file used for this project:

    MONGODB_URI=mongodb://127.0.0.1:27017/social_backend
    # Add other variables as needed
    
  4. Start the application:

    • Backend: Make sure you're still in social_backend and run:

      npm start
    • Frontend: Open a new terminal window/tab and run:

      cd social_frontend
      npm start

      This should open your default browser and display the MERN Social application.

Using the App

When the app first loads, it won't have any posts yet:

image

Start by clicking on Create Post:

image

Create a post and upload an image if you want:

image

Click Post and then click on Home to see your post:

image

At the bottom of your post, you can click the Like button or even add a comment:

image

image

Make it Your Own

Remember that this is only a basic example of a MERN application. Feel free to experiment and make your own changes as you explore how this code works.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Very basic MERN project for testing purposes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published