8000 GitHub - yousef-ysph/blog-app: a blog app that allows people to create posts and comment on them
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

a blog app that allows people to create posts and comment on them

Notifications You must be signed in to change notification settings

yousef-ysph/blog-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

blog-app

a blog app that allows people to create posts and comment on them

Description

Users can create accounts with a username and a password. Logged in users can create posts and comment on them. They can also delete any post that was created by them.

Admins can do everything a normal logged in user can and can delete posts, comments, and users.

Setup

Setup using docker

To run the app inside a docker container. You need to follow the following steps:-

  1. Change the mysql database name, username and password in the dev.env file
MYSQL_HOST=[YOUR_HOST_NAME]
MYSQL_USER=[YOUR_MYSQL_USERNAME]
MYSQL_PASSWORD=[YOUR_MYSQL_USER_PASSWORD]
MYSQL_ROOT_PASSWORD=[YOUR_MYSQL_ROOT_PASSWORD]
MYSQL_DATABASE=[YOUR_DATABASE_NAME]
INCLUDE_PATH=[WHERE_YOUR_APPLICATION_IS_BASED]
  1. run the docker container by entering the following commandline
docker-compose up -d
  1. Migrate the databases by running the following command inside your container.
php Database/migration.php migrate

Setup using apache webserver

  1. Copy the files in the src folder to apache hosting point
  2. Set your enviroment variables to your mysql database name, username and password in your server
MYSQL_HOST=[YOUR_HOST_NAME]
MYSQL_USER=[YOUR_MYSQL_USERNAME]
MYSQL_PASSWORD=[YOUR_MYSQL_USER_PASSWORD]
MYSQL_ROOT_PASSWORD=[YOUR_MYSQL_ROOT_PASSWORD]
MYSQL_DATABASE=[YOUR_DATABASE_NAME]
INCLUDE_PATH=[WHERE_YOUR_APPLICATION_IS_BASED]

in case you don't want to use enviroment variables you can change the user name and password in the src/Database/Connection.php file uncomment and write your password and username

    //self::$user = "your username";
    //self::$password = "your password ";
  1. Migrate the databases by running the following command inside your container.
php Database/migration.php migrate

Making admin users

To create an admin user you need to enter the command:-

php setup/make-admin.php

then enter your username password and name.

Using sample data

To insert fake data into your database for testing you need to enter the command:-

php setup/data-sample.php

then enter your username password and name.

About

a blog app that allows people to create posts and comment on them

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0