CC Report2
CC Report2
on
“BLOG POST”
By
Bharadwaj Pandith(1SI21CS028)
Darshan S (1SI21CS036)
Preethish Jain TR(1SI21CS077)
Tushar M sugur(1SI21CS111)
2023 - 2024
SIDDAGANGA INSTITUTE OF TECHNOLOGY, TUMAKURU-3
CERTIFICATE
This is to certify that Subject Seminar Activity on “Blog Post - Deployment of full-stack
application to the cloud Amazon EC2” is a bonafide work carried out by Bharadwaj Pandith
(1SI21CS038),Darshan S(1SI21CS036), Preethish Jain TR(1SI21CS077) , Tushar M
Sugur(1SI21CS120) of V semester Bachelor of Engineering in Computer Science and
Engineering of the SIDDAGANGA INSTITUTE OF TECHNOLOGY (An Autonomous
Institution, affiliated to VTU, Belagavi & Recognized by AICTE and Accredited by NBA, New
Delhi) during the academic year 2023-2024.
2
Table of Content
1 Abstrac t 4
2 Introductio n 5
3 Problem Statement 6
6 Conclusion 16
7 References 17
3
Abstract
In this blog post, we delve into the key findings of our latest report, providing a comprehensive
analysis of the current trends and future predictions in our field. We highlight the significant insights
and data-driven conclusions drawn from our extensive research. This post aims to provide readers
with a concise overview of the report’s content, emphasizing its relevance and potential impact. Join
us as we explore these findings and discuss their implications for our industry.
Our team developed a dynamic blogging website using Node.js, Express, MongoDB, and AWS EC2.
The website allows users to create, read, update, and delete blog posts. Leveraging modern
technologies, we designed an intuitive user interface with responsive web pages using HTML and
CSS. Our codebase was hosted on GitHub, enabling seamless collaboration among team members.
For deployment, we utilized an AWS EC2 instance, ensuring scalability and reliability.
4
Introduction
In today’s digital landscape, blogs serve as powerful platforms for expression, knowledge sharing,
and community building. Our project aims to create a dynamic blogging website that not only
facilitates content creation but also fosters meaningful interactions among users. Whether you’re a
seasoned writer or a novice penning your first blog post, our platform provides a space to amplify
your voice. We’ve designed an intuitive interface that allows writers to focus on their content
without technical hurdles.
Node.js forms the backbone of our backend. Its non-blocking, event-driven architecture allows us
to handle concurrent requests efficiently. We use it to build robust APIs, manage user
authentication, and handle data flow. Express, a minimalist web application framework for Node.js,
simplifies routing, middleware handling, and API creation. It provides a solid foundation for our
RESTful endpoints, ensuring smooth communication between the frontend and backend.
Our choice of MongoDB as the database system brings flexibility and scalability. As a NoSQL
database, it stores data in JSON-like documents, allowing us to adapt to evolving requirements
without rigid schemas. We store user blog posts in MongoDB collections. Its efficient querying
capabilities and seamless integration with Node.js make it an ideal choice for our dynamic content.
The frontend, built using HTML and CSS, ensures an intuitive user experience. Our responsive
web pages adapt seamlessly to various devices—desktops, tablets, and smartphones. HTML
structures the content, while CSS styles it. We prioritize readability, aesthetics, and accessibility,
creating an inviting environment for both readers and writers.
Our codebase resides on GitHub, enabling efficient collaboration among team members. Version
control ensures that changes are tracked, reviewed, and merged seamlessly. Whether it’s bug fixes,
feature enhancements, or code refactoring, GitHub streamlines our development workflow.
To deploy our website, we rely on an Amazon EC2 instance. This cloud-based server guarantees
uptime, scalability, and reliability. As traffic grows, our EC2 instance dynamically adjusts
resources, ensuring a seamless experience for users. We manage security, backups, and monitoring
within the AWS ecosystem. As we refine and expand, we invite you to join us on this journey. Let’s
celebrate the art of storytelling—one blog post at a time.
5
Problem Statement
In the ever-evolving digital landscape, aspiring writers, seasoned bloggers, and curious minds seek
a platform that transcends mere content creation. Our project aims to address several critical
challenges faced by both writers and readers in the blogging ecosystem.
Existing platforms often lack a seamless content creation workflow. Writers grapple with complex
interfaces, distracting features, and technical barriers. The process of drafting, editing, and
publishing should be intuitive and distraction-free. Our solution is based around streamlining
content creation. By providing a user-friendly interface powered by Node.js and Express, we
empower writers to focus solely on their ideas. Whether it’s a personal reflection, a travelogue, or
a technical tutorial, the platform should facilitate smooth content generation.
Readers crave more than passive consumption—they seek engagement. Traditional blogs often
lack interactive features beyond comments. Readers want to connect with authors, express
appreciation, and participate in discussions. Our dynamic blogging website emphasizes community
interaction. Through features like comments, likes, and shares, readers can actively engage with
content. Authors receive real-time feedback, bridging the gap between writers and their audience.
By curating relevant content and encouraging dialogue, we create an environment where readers
feel connected and valued.
As blogs gain traction, scalability becomes crucial. Hosting solutions must ensure uptime, handle
traffic spikes, and maintain data integrity. Traditional self-hosting setups may lack reliability.
Leveraging AWS EC2, we address scalability and reliability. Our cloud-based server dynamically
adjusts resources, ensuring a seamless experience even during peak traffic. By managing security,
backups, and monitoring, we guarantee a dependable platform for both writers and readers. The
challenge lies in striking the right balance between resource allocation and cost-effectiveness while
maintaining a robust system.
6
Tools and Technologies
Express.js: Express.js is a minimal and flexible Node.js web application framework that provides
a robust set of features for building web and mobile applications. It simplifies the process of
creating RESTful APIs, handling routing, and managing middleware, allowing developers to focus
on building the core functionality of their applications. In this project, Express.js serves as the web
framework for developing the backend of the blood bank management system, enabling efficient
routing, request handling, and middleware integration.
NPM (Node Package Manager): NPM is the default package manager for Node.js, allowing
developers to discover, install, and manage dependencies for their projects. It hosts a vast repository
of reusable code modules, known as packages, which can be easily integrated into Node.js
applications. Within this project, NPM is utilized to install and manage various third-party
packages and libraries, enhancing the functionality and efficiency of the blood bank management
system.
AWS EC2(Elastic Compute Cloud): Amazon EC2 is Amazon Elastic Cloud Computing. This is a
service where Amazon provides us a server where we can deploy our application for absolute
minimum cost and it takes a very little time to do so. By providing the service of AWS EC2 amazon
is giving us a easy way to launch our application without worrying about the bare metal hardware
stuff and the networking part.
Linux AMI: An Amazon Machine Image (AMI) is a pre-configured virtual machine image,
available in the Amazon Web Services (AWS) ecosystem, that is used to launch an instance. A
Linux AMI comes pre-installed with a Linux operating system. Some of the most popular Linux
distributions available AMIs on AWS are Ubuntu, Amazon Linux.
7
Design, Implementation and Deployment Logic
Design:
In the dynamic world of blogging, creating distinct webpages serves essential purposes. These
pages cater to user expectations, enhance functionality, and provide a comprehensive experience.
From the homepage welcoming visitors to the View page introducing the blog’s creators, each
webpage plays a vital role in shaping the reader’s journey.
The approach for this was to split the website into multiple pages. The pages are:
Home Page
Add New Post Page
View Post Page
Edit Page
Alongside this, the project also implements a backend functionality to fetch stored blogs from the
mongo database.
Home Page:
8
Add New Post:
9
Edit page:
10
Implementation And Deployment:
3. Choose AMI:
Here you see multiple AMI options for selection. AMI stands for Amazon Machine Image, which is
basically the software and the operating system that you want to launch on the server.
7. Configure storage:
Select the amount of storage you want your instance to have, for free tier you can choose up to 30 GB
of EBS. I’ll leave this to default and Click on “Launch Instance”.
9. Install Apache:
You can now install Apache, so run below command
sudo apt update
Sudo apt install apache2
To start the service and make sure it remains enable, run below commands
sudo systemctl start apache2
sudo systemctl enable apache2
11
Steps to add the Inbound Rules in Security Group:
We need to add TCP, HTTP and HTTPS protocols to get to our instance. Hence, we add the TCP
request on port 3000, and other protocols to there default port numbers from source.
o In the EC2 dashboard, find the specific instance for which you want to configure
inbound rules.
o Note down its public IP address or public DNS name.
12
Type: Choose the protocol (e.g., SSH, HTTP, HTTPS, etc.).
13
Port Range: Specify the port number(s) relevant to the chosen protocol.
Source: Define the source of incoming traffic. Options include:
My IP: Allows traffic from your current IP address.
Custom IP range: Specify a specific IP range (CIDR notation).
Security group: Allows traffic from instances associated with a specific
security group.
Anywhere (0.0.0.0/0): Allows traffic from any IP address (use with
caution).
7. Save Changes:
o Click Save rules to apply the new inbound rule.
o The changes take effect immediately.
8. Verify Connectivity:
o Test connectivity to your EC2 instance using the configured rules.
o For example, if you added an SSH rule, try connecting via SSH to ensure it works as
expected
i. Install node version manager (nvm) by typing the following at the command line.
sudo su -
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
ii. Activate nvm by typing the following at the command line.
. ~/.nvm/nvm.sh
iii. Use nvm to install the latest version of Node.js by typing the following at the command
line.
nvm install node
iv. Test that node and npm are installed and running correctly by typing the following at the
terminal:
node -
v npm
-v
16
MongoDB Database:
17
Conclusion
In our journey of creating a dynamic blogging website, we’ve explored the intricate interplay of
technology, design, and community engagement. Our user-friendly interface, powered by Node.js
and Express, empowers writers to focus solely on their content without technical distractions.
Whether sharing personal stories, industry insights, or creative pieces, our platform provides a
canvas for their voices.
Beyond passive reading, our community thrives on interaction. Comments, likes, and shares
connect readers with authors, bridging the gap between writers and their audience. By curating
relevant content and encouraging dialogue, we’ve fostered a space where ideas flow freely.
Leveraging AWS EC2, we’ve built a robust hosting solution. Our cloud-based server dynamically
adapts to traffic spikes, ensuring a seamless experience even during peak traffic. Security,
backups, and monitoring are our pillars of reliability. As we continue refining and expanding, we
invite everyone to join—a community of bloggers, thought leaders, and curious minds. Let your
voice resonate across the digital landscape.
18
References
Windows Copilot
https://github.com/yeshwanthlm/nodejs-on-ec2
https://youtu.be/Islmm-LMu38?si=q3cQtG7EpOxd0JWU
https://youtu.be/_U0pTlpyMGg?si=FSXlndoGLnQPyj-y
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html?icmpid=doc
s_ec2_console
https://stackoverflow.com/
19