This repo and project are no longer active as of 2022
A full-stack MERN (MongoDB, Express, React, Node.js) application for managing Corkboard-style content. This app includes both client and server code.
Project presentation for class https://docs.google.com/presentation/d/1UgeIdNwmKTbXaaXFBDlHFwLj6Oombo95sNyzFd6lqXM/edit?usp=sharing
-
Clone this repository to your local machine:
-
Install dependencies for both the server and the client.
-
Navigate to the
server
directory:cd server
-
Install server dependencies:
npm install
-
Ensure MongoDB is running locally or accessible through a URI.
-
Define environment variables (see below for details).
-
Start the server:
npm start
-
Open a new terminal window and navigate to the
client
directory:cd client
-
Install client dependencies:
npm install
-
Start the React development server:
npm run start
Create a .env
file in the server
directory and add the following environment variables:
# MongoDB connection settings
CORK_MONGO_IP=localhost:27017 # replace with your MongoDB server address
# Secret for session encryption
SECRET_COOKIE_PASSWORD=your_secret_password_here
# Environment (set to 'production' for production)
NODE_ENV=development
To start the application:
-
Start the MongoDB server if it isn't running already. Ensure it's accessible via the IP address and port specified in your
.env
file. -
Run the server by navigating to the
server
directory and executing:npm start
The server will listen on the configured port (default is
localhost:5000
). -
Run the client by navigating to the
client
directory and executing:npm start
The client will open at
localhost:3000
by default.
- Dependencies: bcrypt, cors, dotenv, express, iron-session, mongodb, socket.io
- Scripts:
start
: Starts the server using Nodemon, hot-reloading on changes
- Database:
- Uses MongoDB to store Corkboard data
- Connection is established through
MongoClient
and retrieved withgetDb()
- Dependencies: React, Material UI, Lodash, SWR, and React Router
- Scripts:
start
: Starts the React development serverbuild
: Creates a production buildtest
: Runs tests