- Git
- Node.js
- MariaDB
First, fork this repository and then clone it to your local machine:
git clone https://github.com/Miya-JW/blog_website.git
cd blog_website
Navigate to the project directory and run:
npm install
This project uses MariaDB for the database. Follow these steps to set up the database:
-
Install MariaDB: Ensure that MariaDB is installed on your machine. You can download it from MariaDB's official website.
-
Create Database: Open your MariaDB command line client and execute the following commands:
CREATE DATABASE blog_db; USE blog_db;
-
Initialize Database: Import the SQL schema provided in the db-init.sql file:
mysql -u username -p blog_db < path/to/db-init.sql
-
Configure Environment: Rename the .env.sample file to .env and update the database connection details:
DB_HOST=localhost
DB_USER=your_username
DB_PASS=your_password
DB_NAME=blog_db
To run the application, execute:
node app.js
To test the application with pre-configured test user accounts, use the following credentials:
• Username: batman
• Password: 12345
• Username: iron_man
• Password: 12345
• Username: captain_america
• Password: 12345