Skip to content

brown-bytes/brown-bytes-v2

Repository files navigation

A website for sharing free food events information, donating spare meal plan swipes, and networking with people inside or outside Brown community. This website borrowed much inspiration from Scott Huson's work

Visit BrownBytes HERE.

Tech Stack

Frontend: React, Redux, React Bootstrap, Moment, axios.

Backend: Node.js, Express.

Database: MySQL, Sequelize.

Deployment: Docker, Nginx.

Instructions for Running the Code with Docker

Step 1: Install Docker on local machine or on a server

Visit this page to get docker.

Step 2: Edit configs

Find your computer's IP address (not "localhost", may get by running ifconfig command in terminal) in your local network. In the following files, replace the IP address parts (excluding ports) with your IP:

Step 3: Build and run Docker containers

Under root directory BrownBytes, run command:

docker-compose up -d --build

Three containers: MySQL, server, and client will then be built and run locally. After this step, BrownBytes can be visited at http://localhost:3000. This completes setting up BrownBytes with Docker.

Note: Current backend Dockerfile cleans database each time it builds. You may disable this by removing RUN ./reconstructTables.sh.

Instructions for Running the Code in Development Mode

Alternatively, if the Docker method does not work, client and server can be run in development mode.

Step 1. Install MySQL

Download MySQL Community Server and install it. Take a note of your database name, username (root by default), and password. Or pull a MySQL Docker image.

Step 2. Edit Configs

Replace the IP address parts with 127.0.0.1 in the following files.

In file config.json, also replace "username", "password" and "database" with your username, password and database name. And then change "port" from 3305 to 3306.

Step 3. Install dependencies

Run command

npm install

under server and client directories to install dependencies.

Step 4. Set up DB Schema

In the server directory, run reconstructTable.sh to create and initialize tables in the database.

Step 5. Start client server and back end server

Under server directory, run command npm run-script server to start the back end server,

Under client directory, run command npm start to start the client server,

And then the website is accessible at http://localhost:3000.

About

The new version of the Brown Bytes system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5