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.
Frontend: React, Redux, React Bootstrap, Moment, axios.
Visit this page to get docker.
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:
- proxy.js
- Avatar URL in seeder
- Host in config.json
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
.
Alternatively, if the Docker method does not work, client and server can be run in development mode.
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.
Replace the IP address parts with 127.0.0.1
in the following files.
- proxy.js
- Avatar URL in seeder
- Host in config.json
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
.
Run command
npm install
under server
and client
directories to install dependencies.
In the server
directory, run reconstructTable.sh to create and initialize tables in the database.
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.