Skip to content

A simple web project which enables users to read and write posts as well as post comments on them.

Notifications You must be signed in to change notification settings

Acash512/Social-Media-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Technologies used

Backend

  • Node.js
  • Express.js
  • MySQL Server 8.0
  • Sequelize

Frontend

  • HTML, CSS, JS
  • Bootstrap
  • JQuery

Project Setup

Before proceeding make sure you have MySQL, NodeJS and npm installed on your system.

Then To run the project on your local machine follow these steps :

Database Setup

  • In powershell/cmd write the following commands:
mysql.exe -u root -p
  • You will be prompted to enter the password for root user (setup during installation of MySQL) post which you will be able to write SQL commands in your cmd as follows :
create database social_media_db;

create user sample_user identified with mysql_native_password by 'samplepass';

grant all privileges on social_media_db.* to sample_user;

flush privileges;
  • Yay! your database setup is complete

Starting server

  • Open the project in any IDE like VSCode, and in the terminal write the following command to install necessary dependencies like express, mysql2 and sequelize :
npm install
  • Then run the following command to start the server
node src/server.js

Project Structure

├───controllers        //functions to connect routes with db operations    
├───db                 //db connection and model definitions
├───public             //frontend code
│   ├───app            //our own css and frontend js files
│   ├───components     //our own html snippets
│   ├───css            //3rd party css files
│   ├───fonts          //3rd party fonts
│   └───js             //3rd party js files
├───routes             //Express middlewares
│   ├───posts          
│   └───users  
└───utils              //Utility functions

See API documentation here

Screenshots

About

A simple web project which enables users to read and write posts as well as post comments on them.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published