Social Game web app for CSCI-3321
To set up the project, follow these steps:
- Install Node.js and MySQL
- Clone repository
git clone https://github.com/augustryder/Social-Game-App.git
cd Social-Game-App- Install the necessary dependencies:
npm install
- Create a .env file with your MySQL database credentials
# Social-Game-App/.env
DB_HOST=localhost
DB_NAME=social_game_db
DB_USER=[your credentials]
DB_PASSWORD=[your credentials]
- Run create_and_populate.sql to create and initialize the database
mysql -u [username] -p [password] < create_and_populate.sql- Run application
node app.js- Go to http://localhost:3000
For API documentation, go to http://localhost:3000/api-docs
app.js - Main app file
public - contains client-side js and css and images
views/pages - contains ejs pages
views/partials - contains ejs partials
routers - contains js files for routing requests
controllers - contains the logic for communicating with the db and fulfilling the requests
models - database connection and logic
middleware - js session logic
