<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Joseph Adediji</title>
    <description>The latest articles on DEV Community by Joseph Adediji (@josylad).</description>
    <link>https://dev.to/josylad</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F310738%2Ff9882006-b1da-49b0-ab93-4f1da72a8bdb.jpeg</url>
      <title>DEV Community: Joseph Adediji</title>
      <link>https://dev.to/josylad</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/josylad"/>
    <language>en</language>
    <item>
      <title>How to Deploy a Telegram Bot with Flask, pyTelegramBotAPI, Gunicorn and PostgreSQL to Heroku</title>
      <dc:creator>Joseph Adediji</dc:creator>
      <pubDate>Thu, 05 Aug 2021 20:58:15 +0000</pubDate>
      <link>https://dev.to/josylad/how-to-deploy-a-telegram-bot-with-flask-pytelegrambotapi-gunicorn-and-postgresql-to-heroku-dmc</link>
      <guid>https://dev.to/josylad/how-to-deploy-a-telegram-bot-with-flask-pytelegrambotapi-gunicorn-and-postgresql-to-heroku-dmc</guid>
      <description>&lt;p&gt;Over the course of several months, I have been building Telegram bots as a hobby and also for clients but so far, I had no reason to build a bot that will make use of Webhooks, PostgreSQL and Flask framework.&lt;/p&gt;

&lt;p&gt;Previously, most of my Telegram bots were built as a single python file connected to a Google Spreadsheet as a database and deployed to Heroku as explained in my previous guide — “&lt;a href="https://medium.com/tech-insights/how-to-deploy-a-python-script-or-bot-to-heroku-in-5-minutes-a82de2d3ed40"&gt;How to Deploy a Python Script or Bot to Heroku in 5 Minutes&lt;/a&gt;”.&lt;/p&gt;

&lt;p&gt;Building a Telegram bot with Flask, Gunicorn and a database like PostgreSQL is a different ball game and it becomes more interesting when you add Heroku deployment to the mix.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--z0RWm1bP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i452imk43ygm11n5p8g0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--z0RWm1bP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i452imk43ygm11n5p8g0.png" alt="How to Deploy a Telegram Bot with Flask, pyTelegramBotAPI, Gunicorn and PostgreSQL to Heroku"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When I was done building my last Telegram bot project and was ready to deploy it, I couldn’t find any comprehensive guide or tutorial that explained everything I needed to add and configure in order to successfully deploy my Bot; there was no single documentation where I could find all the needed information in one place, most of the tutorials out there are geared towards the deployment of a flask website and not a telegram bot living in a “flask container”.&lt;/p&gt;

&lt;p&gt;Anyways, I was able to pull it off after hours of trials and figuring things out on my own but you don't have to go through that stress because I have made this guide for you and I hope it will be enough for you to successfully deploy your awesome Telegram Bot to Heroku.&lt;/p&gt;

&lt;p&gt;In this step-by-step guide, I will show you how to deploy a Telegram Bot with Flask, pyTelegramBotAPI, Gunicorn, and PostgreSQL to Heroku.&lt;/p&gt;

&lt;p&gt;In this guide, I am using Flask 1.1.2 and pyTelegramBotAPI to build the bot. For some reason, Flask 2.0+ has an issue with SQLAlchemy with throws an error (&lt;em&gt;please don't ask me why!&lt;/em&gt;), but after some research, I found a solution that involves downgrading my Flask to 1.1.2+ version.&lt;/p&gt;

&lt;p&gt;So, you might need to change your Flask version in your requirements.txt file but don’t worry about this if you are able to make your Flask + telegram bot work successfully with your Database even with a newer version of Flask.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;That said, let’s move on with our Telegram Bot with Flask and PostgreSQL deployment to Heroku.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I will try to make the steps as simple as possible but &lt;strong&gt;&lt;em&gt;I will assume you are familiar with Python &amp;amp; Git&lt;/em&gt;&lt;/strong&gt; (I am assuming your project is a git repository) and you have built a &lt;strong&gt;Telegram bot Flask, PostgreSQL, and pyTelegramBotAPI&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Tip&lt;/em&gt;&lt;/strong&gt; : You can activate git in your project folder by running the command git init in your terminal.&lt;/p&gt;

&lt;h3&gt;
  
  
  Let’s Get Started:
&lt;/h3&gt;

&lt;p&gt;So here we use,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.python.org/"&gt;python&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://flask.pocoo.org/"&gt;Flask&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.postgresql.org/"&gt;PostgreSQL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://devcenter.heroku.com/articles/heroku-cli"&gt;Heroku CLI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git-scm.com/"&gt;Git&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pypi.org/project/pyTelegramBotAPI/"&gt;pyTelegramBotAPI&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Steps we follow here:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install Heroku CLI&lt;/li&gt;
&lt;li&gt;Create a new Heroku app&lt;/li&gt;
&lt;li&gt;Install required Packages (Gunicorn &amp;amp; PythonDecouple)&lt;/li&gt;
&lt;li&gt;Create configurations&lt;/li&gt;
&lt;li&gt;Create a database on Heroku&lt;/li&gt;
&lt;li&gt;Setup Environment variables&lt;/li&gt;
&lt;li&gt;Database Configuration&lt;/li&gt;
&lt;li&gt;Bot Deployment&lt;/li&gt;
&lt;li&gt;Database migration&lt;/li&gt;
&lt;li&gt;Troubleshooting &lt;/li&gt;
&lt;li&gt;Testing &lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  1. Install Heroku CLI
&lt;/h3&gt;

&lt;p&gt;You need to install the Heroku CLI on your computer for easy deployment and troubleshooting, the CLI comes with some nice features that will be helpful to you on your deployment journey.&lt;/p&gt;

&lt;p&gt;To install the Heroku CLI on your Computer follow the procedure here for all OS &lt;a href="https://devcenter.heroku.com/articles/heroku-cli"&gt;https://devcenter.heroku.com/articles/heroku-cli&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;em&gt;You can skip this step if you already have Heroku installed on your computer.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Create a new Heroku app
&lt;/h3&gt;

&lt;p&gt;Go to the Heroku website (heroku.com), log in and create a new App; choose a meaningful name for your App.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SPGh7NiX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9la95xlzb8olgmbu9d3v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SPGh7NiX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9la95xlzb8olgmbu9d3v.png" alt="create heroku new app"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Install required Packages (Gunicorn, FlaskSqlAlchemy, psycopg2 &amp;amp; PythonDecouple)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Gunicorn is a Python WSGI HTTP Server for UNIX. The Gunicorn server is broadly compatible with various web frameworks such as Flask. You can install Gunicorn by using:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install gunicorn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;I assume you already have Flask SQLAlchemy installed in your project and you are already using it to connect your bot to your PostgreSQL database.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;if you don’t have it, you can install it by using the command below and check it’s documentation for how to implement it in your app.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install flask_sqlalchemy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These two packages will be responsible for your web server and database connection respectively.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Python Decouple helps you to organize your settings so that you can change parameters without having to redeploy your app using the environment variables. it’s my favorite tool for handling .env file.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;if you don’t have it, you can install it by using the command below and check it’s documentation for how to implement it in your app.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install python-decouple
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Another important package you will need is called “psycopg2”. Psycopg is the most popular PostgreSQL database adapter for the Python programming language.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;if you don’t have it, you can install it by using the command below and check it’s documentation for how to implement it in your app.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install psycopg2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Create configurations
&lt;/h3&gt;

&lt;p&gt;Before you can deploy an app to Heroku, you need to add two important configuration files which are the &lt;strong&gt;Procfile &amp;amp; requirements.txt file&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Procfile Setup
&lt;/h3&gt;

&lt;p&gt;Open your project in your favorite code Editor or Navigate to your project directory and create a file named Procfile&lt;/p&gt;

&lt;p&gt;Next, using any code editor like VSCode or TextEdit, open the Profile, and replace any text already prevalent with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;web: gunicorn app:app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Tip&lt;/strong&gt; : The line above is designating which python script you want to be able to execute through the webserver. In this above example, the “app” by the left of “app:app” is the name of the python file in which I have my Telegram bot, so my telegram bot python file is named &lt;code&gt;“app.py”&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;if your bot python file is named something else, please change it to the correct one. For example, if your python file is named “bot.py” you will have:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;web: gunicorn bot:app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; : There should be no suffix like “.txt” at the end of your Procfile name, it’s just Procfile&lt;/p&gt;

&lt;h3&gt;
  
  
  Requirements.txt File Setup
&lt;/h3&gt;

&lt;p&gt;The requirements.txt file makes it easier for Heroku to install the correct versions of the required Python libraries (or “packages”) to run your Python code.&lt;/p&gt;

&lt;p&gt;We are going to tell Heroku packages to install using our requirements.txt&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Open Your project folder On your Command Line Interface (CLI) inside your environment use the following command:&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip freeze&amp;gt; requirements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;this should automatically generate a requirements.txt file for you with all dependencies and libraries used in your App listed in the file.&lt;/p&gt;

&lt;h3&gt;
  
  
  runtime.txt File Setup
&lt;/h3&gt;

&lt;p&gt;The runtim.txt file allows you to specify the Python version that you are using in your application, this is useful to ensure compatibility and avoid python version problems. Below is an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python-3.8.10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;change this to your own Python version.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Create a database on Heroku
&lt;/h3&gt;

&lt;p&gt;Now, it is almost time to deploy our Telegram bot to Heroku but before that, we need to configure some important things especially a database.&lt;/p&gt;

&lt;p&gt;To do this, Open Your project folder On your Command Line Interface (CLI) inside your environment use the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;heroku login

heroku git:remote -a NAME_OF_YOUR_HEROKU_APP

heroku addons:create heroku-postgresql:hobby-dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once you execute all the commands above, your local app should be linked to your remote &lt;em&gt;Heroku git repository&lt;/em&gt; and a &lt;em&gt;PostgreSQL database&lt;/em&gt; should have been created for your app.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Now, log in to your Heroku dashboard, click on the Settings menu and then on the button &lt;em&gt;Reveal Config Vars&lt;/em&gt;: by default you should have &lt;code&gt;DATABASE_URI&lt;/code&gt; configuration created after installing Postgres to Heroku. You can also add all the environment variables here.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  6. Setup environment variables
&lt;/h3&gt;

&lt;p&gt;If your bot uses a &lt;code&gt;.env&lt;/code&gt; file or if it relies on variables found through Python’s os.environ, you must set them as well in order for your script to work. Typically a Telegram bot requires a token from Bot Father, this is where you add the token.&lt;/p&gt;

&lt;p&gt;Just use Heroku’s config:set&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;heroku config:set [KEY_NANE=value …]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;heroku config:set TOKEN=jfuurhj7367edjkjfkkjrfhre8nfdj
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;this will set my TOKEN environment variable to that value.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Database Configuration
&lt;/h3&gt;

&lt;p&gt;Well, I had to figure out this part the hard way, after my initial deployment, I was having issues with the bot, it kept crashing especially when it comes to database migration until I found the issue which is definitely not my fault.&lt;/p&gt;

&lt;p&gt;I was fortunate enough to find this &lt;a href="https://stackoverflow.com/a/66794960/11934706"&gt;&lt;em&gt;stackoverflow answer&lt;/em&gt;&lt;/a&gt; &lt;em&gt;and&lt;/em&gt; &lt;a href="https://stackoverflow.com/a/67754795/11934706"&gt;&lt;em&gt;this answer&lt;/em&gt;&lt;/a&gt; that solved it.&lt;/p&gt;

&lt;p&gt;The problem is that SQLAlchemy 1.4 removed the deprecated &lt;code&gt;postgres&lt;/code&gt; dialect name, the name &lt;code&gt;postgresql&lt;/code&gt; must be used instead now. The dialect is the part before the &lt;code&gt;://&lt;/code&gt; in the URL. SQLAlchemy 1.3 and earlier showed a deprecation warning but still accepted it.&lt;/p&gt;

&lt;p&gt;To fix this, rename &lt;code&gt;postgres://&lt;/code&gt; in the URL to &lt;code&gt;postgresql://&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This error currently shows up when working with Heroku, which uses &lt;code&gt;postgres&lt;/code&gt; in the &lt;code&gt;DATABASE_URL&lt;/code&gt; they provide, which you probably use for &lt;code&gt;SQLALCHEMY_DATABASE_URI&lt;/code&gt;. To work around this until they update it, update the variable in the Heroku dashboard to use &lt;code&gt;postgresql&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import os
import re

uri = os.getenv("DATABASE_URL") # or other relevant config var
if uri.startswith("postgres://"):
    uri = uri.replace("postgres://", "postgresql://", 1)
# rest of connection code using the connection string `uri`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use the above snippet in your code and set &lt;code&gt;SQLALCHEMY_DATABASE_URI = uri&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app.config['SQLALCHEMY_DATABASE_URI'] = uri
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  8. Bot Deployment
&lt;/h3&gt;

&lt;p&gt;Right now, we have our environment variables setup, we have our database configured and we have all configuration files in place; the next thing is to now deploy our app to Heroku.&lt;/p&gt;

&lt;p&gt;follow the steps below to deploy your app.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add .

git commit -m "Deployment commit"

git push heroku master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From your terminal, you can see your app deployment process and you can see it when the deployment process is completed.&lt;/p&gt;

&lt;p&gt;But wait, we are not yet done!&lt;/p&gt;

&lt;h3&gt;
  
  
  9. Database migration
&lt;/h3&gt;

&lt;p&gt;Right now, your flask app and Telegram bot have been deployed to Heroku but your database is not yet completely set up.&lt;/p&gt;

&lt;p&gt;In order to use a database, you need to create the database tables and you can easily do this through the Heroku CLI. follow the procedures below to create your database tables so that your bot can save data into the database.&lt;/p&gt;

&lt;p&gt;from your terminal, execute:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;heroku run python3
&amp;gt;&amp;gt;&amp;gt; from app import db
&amp;gt;&amp;gt;&amp;gt; db.create_all()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you didn’t get an error, then your database is configured properly!&lt;/p&gt;

&lt;h3&gt;
  
  
  10. Troubleshooting
&lt;/h3&gt;

&lt;p&gt;Truth is, even though I have outlined all the necessary steps here, your deployed app may not work for one reason or the other. On this note, I will share some common issues and troubleshooting tips here.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;App crashing error&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;the first thing to do if your app is not working (&lt;a href="http://heroku-app.heroku.com"&gt;http://heroku-app.heroku.com&lt;/a&gt;) is to go to your CLI and check the logs using&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;_heroku logs --tail_
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command will show you the error log and you can read through it to find out what is making the app crash. When you are done, press &lt;em&gt;Ctrl+C&lt;/em&gt; to return to the prompt.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Database error
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ImportError: cannot import name 'db' from 'app' (unknown location)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;db is not located in app in your application. Find where it's defined and import it from there or check the name of your app file, it could be “bot.py”.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Create a virtual env and install all packages. Ensure you have &lt;code&gt;psycopg2&lt;/code&gt; and &lt;code&gt;gunicorn&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Debug = True. You need to set Debug = False in your Flask Application when deploying to Heroku; Heroku usually does not allow you to run a production app in debug mode and it can cause your app to crash.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Flask Server Port&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As you should know, Telegram bots do not work with the default port &lt;code&gt;“5000”&lt;/code&gt; that comes with Flask, It works with ports 443, 80, 88 or 8443.&lt;/p&gt;

&lt;p&gt;I was getting some server errors and my app was crashing due to this port issue until I was able to detect it and fix it. So, below is a perfect Flask server configuration that will save you a lot of time. Just use the host and port as specified below and you will be fine.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Start Flask Server
if __name__ == "__main__":
app.run(host='0.0.0.0', port=int(os.environ.get('PORT', 5000)))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  11. Testing
&lt;/h3&gt;

&lt;p&gt;At this stage, if everything has gone well, your Telegram bot should be working perfectly.&lt;/p&gt;

&lt;p&gt;You can open your Telegram App and send a message to your bot and it should respond within few seconds.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;If you followed the simple steps in this article, you should be able to successfully deploy your Telegram Bot with Flask, pyTelegramBotAPI, Gunicorn, and PostgreSQL to Heroku using the Command-Line and the Heroku interface.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;If you liked this article please share it with your network and don’t forget to follow me for more great articles and tutorials.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;




</description>
      <category>deployment</category>
      <category>heroku</category>
      <category>telegrambot</category>
      <category>python</category>
    </item>
    <item>
      <title>How to Deploy a Python Script or Bot to Heroku in 5 Minutes</title>
      <dc:creator>Joseph Adediji</dc:creator>
      <pubDate>Mon, 01 Mar 2021 19:04:31 +0000</pubDate>
      <link>https://dev.to/josylad/how-to-deploy-a-python-script-or-bot-to-heroku-in-5-minutes-9dp</link>
      <guid>https://dev.to/josylad/how-to-deploy-a-python-script-or-bot-to-heroku-in-5-minutes-9dp</guid>
      <description>&lt;p&gt;Hey, did you just build a telegram bot or a discord bot or just a python script which you will like to run and make accessible? Well, you are in the right place.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F1%2AFUDIqwvfGMpuwr1A6oOh6w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F1%2AFUDIqwvfGMpuwr1A6oOh6w.png"&gt;&lt;/a&gt;How to Deploy a Python Script or Bot to Heroku in 5 Minutes&lt;/p&gt;

&lt;p&gt;In this article, I will show you how to deploy or host your python bot or script on Heroku Cloud Server.&lt;/p&gt;

&lt;p&gt;I have recently built a Telegram Bot called &lt;a href="https://t.me/blockchainlearningbot" rel="noopener noreferrer"&gt;&lt;strong&gt;Adigun - Blockchain Tutor&lt;/strong&gt;&lt;/a&gt; (&lt;a href="https://github.com/josylad/Adigun-Telegram-Bot" rel="noopener noreferrer"&gt;&lt;em&gt;Github&lt;/em&gt;&lt;/a&gt;), it was built with Python and was Deployed to Heroku for public Access and after figuring out how to make my bot work, I decided to write this guide to help other developers who will want to deploy their own bot to Heroku.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Heroku?
&lt;/h3&gt;

&lt;p&gt;Well, Heroku has one of the best cloud hosting solutions in the industry, especially in the PaaS Niche and they have a FREE plan which is more than enough for a bot or any fun projects.&lt;/p&gt;

&lt;p&gt;I will try to make the steps as simple as possible but &lt;strong&gt;&lt;em&gt;I will assume you are familiar with Python &amp;amp; Git&lt;/em&gt;&lt;/strong&gt; (I am assuming your project is a git repository).&lt;/p&gt;

&lt;p&gt;Tip: You can activate git in your project folder by running the command git init in your terminal.&lt;/p&gt;

&lt;h3&gt;
  
  
  Let's Get Started:
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Heroku Setup
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt; - Install the Heroku CLI on your Computer (You can find the procedure here for all OS &lt;a href="https://devcenter.heroku.com/articles/heroku-cli" rel="noopener noreferrer"&gt;https://devcenter.heroku.com/articles/heroku-cli&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;em&gt;You can skip this step if you already have Heroku installed on your computer.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt; - Go to Heroku website (heroku.com), login and create a new App; choose a meaningful name for your App.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F1%2ARcFCFWwH-uXBYDrMg0opTA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F1%2ARcFCFWwH-uXBYDrMg0opTA.png"&gt;&lt;/a&gt;Create a new app on heroku&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3&lt;/strong&gt; - Now we need to add a python build path, head over to &lt;strong&gt;Settings&amp;gt;Add Build Path&amp;gt;Select the Python Option&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F933%2F1%2AvCnY0M0pnzLCXig8jM2XlA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F933%2F1%2AvCnY0M0pnzLCXig8jM2XlA.png"&gt;&lt;/a&gt;click your App and go to settings&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F1%2Aqf2EH63f26srQq-orohQTQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F1%2Aqf2EH63f26srQq-orohQTQ.png"&gt;&lt;/a&gt;Add python buildpack on heroku&lt;/p&gt;

&lt;h3&gt;
  
  
  Deploying Our Script
&lt;/h3&gt;

&lt;p&gt;Before you can deploy an app to Heroku, you need to add Two Important Files which are the &lt;strong&gt;Procfile &amp;amp; requirements.txt file&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Procfile Setup
&lt;/h3&gt;

&lt;p&gt;Open your project in your favourite code Editor or Navigate to your project directory and create a file named Procfile&lt;/p&gt;

&lt;p&gt;Next, using any code editor like VSCode or TextEdit, open the Profile, and replace any text already prevalent with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;web: python YOURSCRIPTNAME.py

worker: python YOURSCRIPTNAME.py 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Tip&lt;/strong&gt; : The lines above are designating which python script you want to be able to execute through Heroku.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; : There should be no suffix like “.txt” at the end of your Procfile name, it's just Procfile&lt;/p&gt;

&lt;h3&gt;
  
  
  Requirements.txt File Setup
&lt;/h3&gt;

&lt;p&gt;The requirements.txt file makes it easier for Heroku to install the correct versions of the required Python libraries (or “packages”) to run your Python code.&lt;/p&gt;

&lt;p&gt;We are going to tell Heroku packages to install using our requirements.txt&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Open Your project folder On your Command Line Interface (CLI) inside your environment use the following command:&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip freeze&amp;gt; requirements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;this should automatically generate a requirements.txt file for you with all dependencies and libraries used in your App listed in the file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; : At this point, you can save all files, commit your changes and push your project to your Github repository.&lt;/p&gt;

&lt;h3&gt;
  
  
  Deploying to Heroku
&lt;/h3&gt;

&lt;p&gt;Now, it is time to deploy our python bot or script to Heroku.&lt;/p&gt;

&lt;p&gt;To do this, Open Your project folder On your Command Line Interface (CLI) inside your environment use the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;heroku login

heroku git:remote -a NAME_OF_YOUR_HEROKU_APP

git add .

git commit -am "Deployment commit"

git push heroku master 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Setup environment variables
&lt;/h3&gt;

&lt;p&gt;If your bot uses a .env file or if it relies on variables found through Python’s os.environ, you must set them as well in order for your script to work.&lt;/p&gt;

&lt;p&gt;Just use Heroku’s config:set&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;heroku config:set [KEY_NANE=value …]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;heroku config:set TOKEN=jfuurhj7367edjkjfkkjrfhre8nfdj
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;this will set my TOKEN environment variable to that value.&lt;/p&gt;

&lt;h3&gt;
  
  
  Running the App or bot on Heroku
&lt;/h3&gt;

&lt;p&gt;This is the final step! Now in order to turn on/execute our script, we have to open up our app on the Heroku Website, go to Resources, and hit edit on our worker.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Enable both the web and worker, then save.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; : It can take up to two minutes for the script to start running!&lt;/p&gt;

&lt;p&gt;If your app is still not working, on your Terminal, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;heroku ps:scale worker=1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;If you followed the simple steps in this article, you should be able to successfully deploy your Python Bot or Script to Heroku using the Command-Line and the Heroku interface.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;If you liked this article please share it with your network and don't forget to follow me for more great articles and tutorials.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;




</description>
      <category>pythonbot</category>
      <category>deployment</category>
      <category>herokudeployment</category>
      <category>heroku</category>
    </item>
    <item>
      <title>SEO for Developers: Meta SEO</title>
      <dc:creator>Joseph Adediji</dc:creator>
      <pubDate>Wed, 09 Sep 2020 19:20:44 +0000</pubDate>
      <link>https://dev.to/josylad/seo-for-developers-meta-seo-3pp8</link>
      <guid>https://dev.to/josylad/seo-for-developers-meta-seo-3pp8</guid>
      <description>&lt;p&gt;&lt;strong&gt;Hello everyone&lt;/strong&gt;, welcome to the first article in this exciting series called  &lt;a href="https://hashnode.com/series/seo-for-developers-series-ckeuc1fyo01s1w4s1brpn9spp"&gt;SEO for Developers&lt;/a&gt;. In this series, I will be covering the various aspects of search engine optimization and how you can optimize your web apps for search engines. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2C-wPwUW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1599652054119/X7OPEDG5K.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2C-wPwUW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1599652054119/X7OPEDG5K.png" alt="SEO for Developers (1).png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Search engine optimization (SEO) is a very interesting topic, I have always been fascinated by how tiny tweaks and optimization can have a huge impact on a website organic traffic.&lt;/p&gt;

&lt;p&gt;I have been doing SEO on &amp;amp; off for about 10 years, I started out online with blogging in 2009 and I once built and sold a popular blog for 5-figures USD and during my blogging days, SEO has been one of my strongest fort and favourite topics. &lt;/p&gt;

&lt;p&gt;Though I left blogging and moved on to other things like software development, the knowledge &amp;amp; skills that I gained over the years have stuck with me. &lt;br&gt;
And whenever I am building a website, SEO is always at the top of my to-do list. &lt;/p&gt;

&lt;p&gt;Before we dive into it, I want you to know that there are various aspect of SEO and you need to optimize your website in all these areas; when these various aspects are properly optimized, their combined SEO optimization will give you a great advantage over your competitors in search engine result pages (SERPs). &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For the purpose of this SEO for developers series, I will be diving SEO into 4 major groups:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Meta SEO &lt;/li&gt;
&lt;li&gt; On-page SEO &lt;/li&gt;
&lt;li&gt; Indexing or Indexation Optimization &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These three aspects of SEO will form the core of the teaching in this series. If any developer can understand and implement these 3 aspects of Search Engine Optimization in all their project, they will always come out with a search engine optimized web application. &lt;/p&gt;

&lt;p&gt;So, in this first part of the SEO for developers series, I will be taking you through the &lt;strong&gt;Meta SEO aspect of search engine optimization&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;And so, we begin! &lt;/p&gt;
&lt;h1&gt;
  
  
  What is Meta SEO?
&lt;/h1&gt;

&lt;p&gt;Meta SEO is the process of optimizing a web page by using meta tags. &lt;em&gt;Meta tags are code snippets which are embedded in a page **head section&lt;/em&gt;* and it is used to give search engines important information about a particular web page. *&lt;/p&gt;

&lt;p&gt;Usually, meta tags are placed between the opening head (&lt;em&gt;&lt;/em&gt;) and closing head (&lt;em&gt;&lt;/em&gt;) tags of a web page. &lt;/p&gt;

&lt;p&gt;Every web page is supposed to have these meta tags which will tell the search engines how they should display the web page in search engine result pages and also tell web browsers how to display the web page to the users. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Meta tags are not shown to your website visitors, they are only meant for search engines, browsers or crawlers, hence they are only visible in the HTML code. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When it comes to meta SEO, there are six important tags that you should consider using in your web projects. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The six most important meta SEO tags are:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;  Meta title tag &lt;/li&gt;
&lt;li&gt;  Meta description tag &lt;/li&gt;
&lt;li&gt;  Meta robots tag &lt;/li&gt;
&lt;li&gt;  Open graph tags (social media meta tags)&lt;/li&gt;
&lt;li&gt;  Meta charset tag &lt;/li&gt;
&lt;li&gt;  Meta viewport tag &lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  1.  The Meta Title Tag
&lt;/h2&gt;

&lt;p&gt;The meta title is usually the title that Google and most other search engines show on search engine result pages (SERPs). &lt;/p&gt;

&lt;p&gt;You can add a title to your web page by placing a title tag between the &lt;strong&gt;opening and closing head&lt;/strong&gt; tags in your page HTML as shown below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;head&amp;gt;
&amp;lt;title&amp;gt;This is a Title &amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When adding a title to your web page, &lt;strong&gt;make sure it is between 55 - 60 characters&lt;/strong&gt; (&lt;em&gt;characters, not words!&lt;/em&gt;), because Google &amp;amp; most search engines typically show 55 - 60 characters in SERPs. &lt;/p&gt;

&lt;h2&gt;
  
  
  Tips for writing Good Page Titles
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Write a Unique Title for Each page&lt;/strong&gt; - if you are building a web app, you can add dynamic values in the Meta title tags which will be evaluated in the page HTML when rendering the web page. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, in my  &lt;a href="https://www.internplug.com/"&gt;InternPlug&lt;/a&gt; Web App, I am passing the page title to the front-end using the code below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;basic_title = job.title.title()

title = f'{basic_title} Intern'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;The above code will use the job title combined with the "Intern" keyword as the page title. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Title must be related to the page content&lt;/strong&gt; - Don't use titles that doesn't describe the page content.&lt;/li&gt;
&lt;li&gt;*&lt;em&gt;Use keywords in the page title *&lt;/em&gt;- Include keywords that best describe the web page content, but don’t stuff the title with keywords else you will be penalized. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use Sentence of Title case&lt;/strong&gt; &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make the title interesting&lt;/strong&gt; - remember that search engine users will see this title, so make it click-worthy &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use unique title on each page&lt;/strong&gt; - More than one pages should not have the exact same title. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2.  The Meta Description Tag
&lt;/h2&gt;

&lt;p&gt;The meta description tag should contain the &lt;strong&gt;&lt;em&gt;summary or short description&lt;/em&gt;&lt;/strong&gt; of your web page content. Search engines often show the meta description in search result pages below the page title. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--J6eNWv4x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1599654693608/7hoRgMc8f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--J6eNWv4x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1599654693608/7hoRgMc8f.png" alt="hasnode in google.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can add meta description to your web page by including the meta description tags in the &lt;strong&gt;head section&lt;/strong&gt; of your page HTML. &lt;br&gt;
Below is a sample meta description tag.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;meta name=”description” content=”This is a meta description that will summarize our page content. We can add up to 160 characters.”&amp;gt;`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://support.google.com/webmasters/answer/35624?visit_id=636880082951453933-4272044119&amp;amp;rd=1"&gt;According to Google&lt;/a&gt; : “A meta description tag should generally inform and interest users with a short, relevant summary of what a particular page is about. They are like a pitch that convince the user that the page is exactly what they're looking for."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Tips for Writing Good Meta Descriptions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Write a unique description for each page&lt;/strong&gt; - if your website generates dynamic pages like most web apps do, you can use dynamic values in your meta description to make it unique for each page. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Below is a sample description tag in my Django template, you can see that I am passing in dynamic values which changes for each page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;meta name="description" content="{{job.description|striptags|truncatechars:150}} a nice description generated from the page content"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Keep it within 160 characters&lt;/strong&gt; - though Google claims there is no fixed length for the description snippets, it is best to keep it in the range of &lt;strong&gt;130 - 160 characters&lt;/strong&gt;* (not words). &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Add Relevant keywords in the description&lt;/strong&gt; (2-3 keywords).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Don’t stuff it with keywords&lt;/strong&gt; - Search engines are smart enough to know when your description is keyword stuffed and if it doesn't make any sense. Search engine users are also smart enough to know if a description snippet has no meaning; instead, write a short summary that will make people want to visit your web page. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Do not add duplicate Meta tags&lt;/strong&gt;, use one meta description per page. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;*&lt;em&gt;Write it for your users. *&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: Google may not show your own specified meta description snippets in SERPs but instead automatically generate their own if they feel theirs is more suitable for the page. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  3.  The Meta Robots Tag
&lt;/h2&gt;

&lt;p&gt;The Meta Robots tag provides instructions to search engines and web crawlers on if and how they should crawl your web pages. &lt;br&gt;
The robots meta tags are meant to tell search engines whether to &lt;em&gt;index or not to index&lt;/em&gt; your web pages.&lt;/p&gt;

&lt;p&gt;** The Robots meta tags has four main values for search engine crawlers, which are: ** &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;FOLLOW&lt;/strong&gt; - the web crawler should follow all links on the page; this is good for archives or sitemap pages. &lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;NOFOLLOW&lt;/strong&gt; - the search engine crawler should NOT follow the links on the page. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;INDEX&lt;/strong&gt; - the search engine crawler should index the web page and show it in search engine results. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;NOINDEX&lt;/strong&gt; - the search engine crawlers should NOT index the web page and NOT show it in search result pages. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The NOINDEX tag is quite useful for pages you do not want to be found or discovered in search engines, pages such as dashboards or admin area. &lt;/p&gt;

&lt;p&gt;You can add the robots meta tag to your web page by including the snippet in the head section of your page HTML.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;meta name=”robots” content=”noindex, nofollow”&amp;gt; – Means not to index and not to follow links on this web page.

&amp;lt;meta name=”robots” content=”index, follow”&amp;gt; – Means index and follow links on this web page.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;You can combine the four values in any of the following ways:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;meta name=”robots” content="noindex, nofollow"&amp;gt;
&amp;lt;meta name=”robots” content="index, follow"&amp;gt;
&amp;lt;meta name=”robots” content="noindex, follow"&amp;gt;
&amp;lt;meta name=”robots” content="index, nofollow"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: &lt;strong&gt;Not&lt;/strong&gt; setting a meta robots tag is equivalent to “&lt;strong&gt;index, follow&lt;/strong&gt;”, which means search engines will index and follow all links on that web page.  &lt;/p&gt;

&lt;h2&gt;
  
  
  4.  The Open Graph Tags (Social media meta tags)
&lt;/h2&gt;

&lt;p&gt;The open graph meta tags are specifically designed for social media sites. &lt;br&gt;
Open graph also called OG tags are meant to create an integration between social media sites like Facebook, twitter, Pinterest, Google and website URLs shared on these platforms. &lt;/p&gt;

&lt;p&gt;The open graph tags will help social media sites to find the correct title, image, description and link to a shared content. If you have shared a URL on any social media site and it doesn't show an image or a proper description, then the open graph meta tags are missing. &lt;/p&gt;

&lt;p&gt;This issue can be quickly fixed by adding the OG tags in the head section of the page HTML.&lt;br&gt;
Here is a code snippet of what OG tags look like, this should all go in the &lt;strong&gt;head section&lt;/strong&gt; of your web page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;meta property=”og:type” content=”article” /&amp;gt;

&amp;lt;meta property=”og:title” content=”TITLE OF YOUR POST OR PAGE” /&amp;gt;

&amp;lt;meta property=”og:description” content=”DESCRIPTION OF PAGE CONTENT” /&amp;gt;

&amp;lt;meta property=”og:image” content=”LINK TO THE IMAGE FILE” /&amp;gt;

&amp;lt;meta property=”og:url” content=”PERMALINK” /&amp;gt;

&amp;lt;meta property=”og:site_name” content=”SITE NAME” /&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Twitter Cards
&lt;/h3&gt;

&lt;p&gt;Twitter cards are similar to open graph tags, except that they are specifically meant for twitter. *I really don’t know why twitter wants their own tags when they can just use the OG tags. &lt;br&gt;
*&lt;br&gt;
Anyways, below is how the twitter cards tag look like, this snippet should also go into the head section of your web page HTML.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; &amp;lt;meta name="twitter:card" content="summary_large_image" /&amp;gt;

&amp;lt;meta name=”twitter:title” content=”TITLE OF POST OR PAGE”&amp;gt;

&amp;lt;meta name=”twitter:description” content=”DESCRIPTION OF PAGE CONTENT”&amp;gt;

&amp;lt;meta name=”twitter:image” content=”LINK TO IMAGE”&amp;gt;

&amp;lt;meta name=”twitter:site” content=”@USERNAME”&amp;gt;

&amp;lt;meta name=”twitter:creator” content=”@USERNAME”&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;How both tags will look like on a web page:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Tbn0Y83r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1599655186439/fAv3gy2-N.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Tbn0Y83r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1599655186439/fAv3gy2-N.png" alt="opengraoh tags.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;


&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: If you are a Django developer like me, there is a package called  &lt;a href="https://django-meta.readthedocs.io/en/latest/"&gt;Django Meta&lt;/a&gt;  which can help you with adding SEO meta tags to your app with ease (make sure you read it’s documentation).&lt;/p&gt;

&lt;p&gt;Also, for Laravel developers, there is a package called  &lt;a href="https://github.com/davmixcool/laravel-meta-manager"&gt;Laravel Meta Manager&lt;/a&gt;, this can also help you with adding Meta SEO to your applications. &lt;/p&gt;

&lt;h2&gt;
  
  
  5.  The Meta Viewport Tag (Responsive Design Meta Tag)
&lt;/h2&gt;

&lt;p&gt;A meta viewport tag is a very important tag, especially in this mobile-first era. &lt;br&gt;
The viewport meta tag sets the visible area of a web page, it instructs the browser on how to render the page on different screen sizes (desktop, tablets or mobile). &lt;/p&gt;

&lt;p&gt;Just like the other meta tags, the viewport tag also goes into the head section of your HTML. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tip&lt;/strong&gt;: If you have a base HTML file from which all other pages inherit from, then you should set the viewport tag in the base HTML file. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Viewport meta tag snippet:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;meta name=”viewport” content=”width=device-width,initial-scale=1″&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: the viewport tag is not a magic wand that will page your website responsive; you need to make use of responsive design principles in your web project for it to look good on all screen sizes. &lt;/p&gt;

&lt;p&gt;I am a big fan of Bootstrap and I recommend it for anyone who wants to build responsive websites. &lt;/p&gt;

&lt;h3&gt;
  
  
  Best Practices
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use the meta viewport tag on all pages &lt;/li&gt;
&lt;li&gt;Use the “standard” tag (shown above), it works for most web pages, but of course, tweak values if you know what you doing. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  6.  The Meta Charset Tag
&lt;/h2&gt;

&lt;p&gt;The meta charset tag is also another important tag that you should include on all pages on your website. &lt;br&gt;
The meta charset tag sets the character encoding for a web page, it tells the browser how the texts and symbols on your web pages should be displayed. &lt;/p&gt;

&lt;p&gt;There are numerous character encoding out there, but the two most common ones are: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;UTF-8&lt;/strong&gt; - Unicode character encoding &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ISO-8859&lt;/strong&gt; - Character encoding for Latin alphabets &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When you don't use the right character encoding, some of the characters or texts on your web page can display in web browsers. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VONdof3K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1599656077613/AHJ4xCmpU.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VONdof3K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1599656077613/AHJ4xCmpU.png" alt="charset-issue-1.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Incorrect display of characters is bad for user experience and some times, it makes it difficult for search engines to understand the page content. &lt;br&gt;
The rule of thumb is to use the “UTF-8” tag and set it on all pages. &lt;/p&gt;

&lt;p&gt;So, as I said earlier, if you have a base HTML template file, it will be wise to include the meta charset tag in the base HTML file, this tag should be set globally and it should be on all pages of your website. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Below is the meta charset tag snippet, make sure you include it in the head section of all your page HTML.&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;meta charset=UTF-8"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How to diagnose and fix common Meta SEO issues
&lt;/h2&gt;

&lt;p&gt;When it comes to checking SEO score and search engine optimization errors, I usually use a sneaky FREE tool called  &lt;a href="https://www.woorank.com/"&gt;WooRank&lt;/a&gt;. &lt;br&gt;
WooRank will scan your website and suggest various areas that need improvement and how best to fix it. &lt;/p&gt;

&lt;p&gt;Make sure you use the tool to scan your site after you have done your SEO. &lt;/p&gt;

&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;Meta tags may look like small snippets, but they have huge implications on your website usability and Search engine optimization effort. &lt;/p&gt;

&lt;p&gt;If you care about how your web apps perform in search engine result pages or social media sites, then you should pay attention to these six meta tags. &lt;/p&gt;

&lt;p&gt;Though there are other meta tags available, these six are the most important ones while some other ones such as the “redirect meta tag” should be avoided. &lt;/p&gt;

&lt;p&gt;I hope you have enjoyed this piece, if you have any questions or additions, kindly drop them in the comment section and I will do my best to reply. &lt;/p&gt;

&lt;p&gt;*** Before you go, kindly hit the share buttons to share this article on Twitter and Facebook. ***&lt;/p&gt;

&lt;p&gt;This article is the first post in my  &lt;a href="https://hashnode.com/series/seo-for-developers-series-ckeuc1fyo01s1w4s1brpn9spp"&gt;SEO for developers series&lt;/a&gt;, make sure you subscribe to my blog to get notified when new series are published. &lt;/p&gt;

</description>
      <category>seo</category>
      <category>searchengineoptimization</category>
      <category>seotips</category>
    </item>
    <item>
      <title>7 Brilliant Ways To Get Internships</title>
      <dc:creator>Joseph Adediji</dc:creator>
      <pubDate>Wed, 17 Jun 2020 22:18:24 +0000</pubDate>
      <link>https://dev.to/josylad/7-brilliant-ways-to-get-internships-g02</link>
      <guid>https://dev.to/josylad/7-brilliant-ways-to-get-internships-g02</guid>
      <description>&lt;p&gt;Let’s face it, those days when a college degree was all you needed to guarantee your position in a high-paying establishment immediately after graduation are long gone.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--efjxXosO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/0%2AFwuFgcy11Wi-EvYc" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--efjxXosO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/0%2AFwuFgcy11Wi-EvYc" alt=""&gt;&lt;/a&gt;Photo by &lt;a href="https://unsplash.com/@brookecagle?utm_source=medium&amp;amp;utm_medium=referral"&gt;Brooke Cagle&lt;/a&gt; on &lt;a href="https://unsplash.com?utm_source=medium&amp;amp;utm_medium=referral"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With the number of fresh job-seekers surpassing the available job-opportunities, sadly, your degree alone doesn’t cut it anymore.&lt;/p&gt;

&lt;p&gt;Nowadays, employers expect college grads to have enough internship experience to hit the ground running on their first job.&lt;/p&gt;

&lt;p&gt;You must consider taking on a minimum of one internship role (or perhaps multiple) while you’re still in college.&lt;/p&gt;

&lt;p&gt;Internships can serve as invaluable sources of experience. Apart from making your future resume look good, it will also give you firsthand experience in your career of choice, help you &lt;a href="https://www.internplug.com/blog/7-skills-from-an-internship/"&gt;develop relevant skills&lt;/a&gt;, and give you pertinent contacts in the industry.&lt;/p&gt;

&lt;p&gt;Sometimes, getting these roles can be tough so if you’re planning on spending your next summer break as an intern, you’ll need some tips on how to proceed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;If you’re reading this article, it must mean that you’re tired of being a couch potato and intend to make this summer count — especially after the extended pandemic lockdown.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So I decided to do your homework for you by coming up with a DIY guide on how to land that internship role.&lt;/p&gt;

&lt;p&gt;Before I deep dive into the best ways to get internships, you’ll need a few pointers first:&lt;/p&gt;

&lt;h3&gt;
  
  
  Knowing Where to Look
&lt;/h3&gt;

&lt;p&gt;Once you have identified your ideal internship role, you must take a look at what opportunities exist out there!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here’s how:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Check out corporate web pages that feature lots of job listings regularly, so you will likely find something appropriate for you. You can also check internship listing sites like &lt;a href="https://www.internplug.com/"&gt;InternPlug.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Internship title filters are there for you to use to browse for specific roles you are interested in. You can narrow down your search results according to company ratings, location, industry, size, and others.&lt;/p&gt;

&lt;h3&gt;
  
  
  Impressive Resume
&lt;/h3&gt;

&lt;p&gt;Your resume is always the very first impression. It is the perfect way to introduce yourself to a future employer and highlight your skills, interests, experience, awards/accolades, and goals.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5GSufQvn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/0%2AlVb6JRrF9FyvqFTi" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5GSufQvn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/0%2AlVb6JRrF9FyvqFTi" alt=""&gt;&lt;/a&gt;Photo by &lt;a href="https://unsplash.com/@markuswinkler?utm_source=medium&amp;amp;utm_medium=referral"&gt;Markus Winkler&lt;/a&gt; on &lt;a href="https://unsplash.com?utm_source=medium&amp;amp;utm_medium=referral"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your resume must be neat and presentable, at least 1 to 2 pages long, grammatically correct, and pleasing to the eye.&lt;/p&gt;

&lt;h3&gt;
  
  
  College Career Resources
&lt;/h3&gt;

&lt;p&gt;Almost every college nowadays has a career web page where employers post internship positions for college students to apply.&lt;/p&gt;

&lt;p&gt;Internship and career fairs are also quite valuable since they offer up opportunities for you to connect with potential employers on a personal level.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Next comes the section of this guide you’ve been waiting for:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  7 Brilliant Ways to Get Internships
&lt;/h3&gt;

&lt;p&gt;Finding the right internship role will require time &amp;amp; planning; however, the outcome is usually worth the effort. We’ve highlighted a few recommendations for finding internships and excelling at them.&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Begin Your Search Early
&lt;/h4&gt;

&lt;p&gt;Certain industries tend to recruit and hire interns as early as November and these roles often come with deadlines. You can start looking for suitable internship roles during the winter break so you can have an adequate head-start.&lt;/p&gt;

&lt;p&gt;It’s also an excellent opportunity to connect with valuable professionals or alumni within industries of interest before heading back for college.&lt;/p&gt;

&lt;p&gt;You can discover which organizations are recruiting early for internships by seeking assistance from the Career Services Office at your college.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Identify Your General Areas Interests
&lt;/h4&gt;

&lt;p&gt;You must decide on which career path you wish to follow, however, you mustn’t worry too much about the specifics at this point.&lt;/p&gt;

&lt;p&gt;Gaining hands-on experience in diverse career fields is always an excellent idea — especially if you’ve not yet made up your mind on which career you wish to pursue upon graduation.&lt;/p&gt;

&lt;p&gt;Think about those things you enjoy doing and how they could transition into a bonafide career.&lt;/p&gt;

&lt;p&gt;Perhaps you enjoy Home Design &amp;amp; Improvement, Social Activism, or watching Finance &amp;amp; Investment shows; internships roles can give you direct exposure to those job opportunities along with a chance to try out new and exciting industry sectors.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Network
&lt;/h4&gt;

&lt;p&gt;You must first find an internship position to get one.&lt;/p&gt;

&lt;p&gt;Enter networking skills.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wHRRNBr8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/0%2AZcVTN_Jop2DzXOU-" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wHRRNBr8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/0%2AZcVTN_Jop2DzXOU-" alt=""&gt;&lt;/a&gt;Photo by &lt;a href="https://unsplash.com/@evangelineshaw?utm_source=medium&amp;amp;utm_medium=referral"&gt;Evangeline Shaw&lt;/a&gt; on &lt;a href="https://unsplash.com?utm_source=medium&amp;amp;utm_medium=referral"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Everyone knows someone else so it really doesn’t matter whether you’re talking to a family friend, your favourite professor, or even your academic advisor. You must harness the potential of networking to discover internships, and also learn how to contact companies directly.&lt;/p&gt;

&lt;p&gt;Perhaps you have a particular company in mind where you dream of working, you could always try the longshot approach by writing them a formal letter even if they don’t have any internship openings; they might contact you whenever a role is available.&lt;/p&gt;

&lt;h4&gt;
  
  
  4. Make Use of Online Resources
&lt;/h4&gt;

&lt;p&gt;Apart from contacting your college’s Career Services Office to find out which internship resources they recommended, you should also consider using internet resources to expand your search.&lt;/p&gt;

&lt;p&gt;You can try visiting the official web pages of your preferred companies along with online &amp;amp; offline classified ads.&lt;/p&gt;

&lt;p&gt;You should also have a polished online portfolio of any notable work samples &amp;amp; projects you have executed that will help you stand out.&lt;/p&gt;

&lt;h4&gt;
  
  
  5. Attend Career Fairs
&lt;/h4&gt;

&lt;p&gt;Large universities are into organizing career fairs on campus. They often invite several company representatives from across different industries to attend.&lt;/p&gt;

&lt;p&gt;It doesn’t really matter what college you attend, there’s likely to be a career fair happening in your area or a major city nearby.&lt;/p&gt;

&lt;p&gt;These career fairs provide excellent opportunities to find internship roles because recruiters and company representatives are there to discover fresh talent.&lt;/p&gt;

&lt;p&gt;You’ll need to make a good first impression; this approach can even help you to bypass the process of application (or most of it).&lt;/p&gt;

&lt;h4&gt;
  
  
  6. Stay Local
&lt;/h4&gt;

&lt;p&gt;While having a big company on your resume can be pretty impressive, interning at a smaller company in your area could turn out to be equally valuable.&lt;/p&gt;

&lt;p&gt;Why? Well for starters, internships at small businesses tend to have a fewer number of applicants, which automatically increases your chances of landing the role.&lt;/p&gt;

&lt;p&gt;This is hardly the case for internship roles at larger corporations, where you’re likely to find hundreds or maybe even thousands of internship applicants.&lt;/p&gt;

&lt;h4&gt;
  
  
  7. Follow-Up &amp;amp; Finalize
&lt;/h4&gt;

&lt;p&gt;You will be invited for an interview at some point, after which you can relax a bit. But you must remember to send them a thank you message or email after about a week or two appreciating them for their time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uj7CvwiO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/0%2A8O5u5cnC8OczauVu" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uj7CvwiO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/0%2A8O5u5cnC8OczauVu" alt=""&gt;&lt;/a&gt;Photo by &lt;a href="https://unsplash.com/@kundeleknabiegunie?utm_source=medium&amp;amp;utm_medium=referral"&gt;Agnieszka Boeske&lt;/a&gt; on &lt;a href="https://unsplash.com?utm_source=medium&amp;amp;utm_medium=referral"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You may also have a few post-interview inquiries. Feel free to include them in your follow up email as well.&lt;/p&gt;

&lt;p&gt;Don’t forget to follow up again after a while to inquire about your candidacy. Following up professionally can even earn you kudos.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rounding-Up
&lt;/h3&gt;

&lt;p&gt;That’s it for our guide on the best ways to land that &lt;a href="https://en.wikipedia.org/wiki/Internship"&gt;internship&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Hopefully, your role as an intern should begin shortly after reading it.&lt;/p&gt;

</description>
      <category>internshipexperience</category>
      <category>summerinternships</category>
      <category>intern</category>
      <category>internships</category>
    </item>
    <item>
      <title>How to Create Django SEO Friendly URL using Slugs</title>
      <dc:creator>Joseph Adediji</dc:creator>
      <pubDate>Tue, 19 May 2020 20:51:11 +0000</pubDate>
      <link>https://dev.to/josylad/how-to-create-django-seo-friendly-url-using-slugs-2p6p</link>
      <guid>https://dev.to/josylad/how-to-create-django-seo-friendly-url-using-slugs-2p6p</guid>
      <description>&lt;h3&gt;
  
  
  How to Create Django SEO Friendly URL using Slugs/SlugField
&lt;/h3&gt;

&lt;p&gt;Search engine optimization (SEO) is a very important aspect of any web application especially if you are hoping to get a handful of traffic from search engines such as Google.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UPt8eqii--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/712/1%2AOtwCX21_EN82uwouYuWcHg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UPt8eqii--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/712/1%2AOtwCX21_EN82uwouYuWcHg.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are many components/parts involved in building a search engine optimized website and of them is search engine friendly URLs also known as &lt;strong&gt;&lt;em&gt;keyword-rich URLS / user-friendly URLs / slug URLs.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Luckily for us, Django comes inbuilt with a &lt;strong&gt;&lt;em&gt;SlugField&lt;/em&gt;&lt;/strong&gt; Model Field that allows us to easily generate search engine friendly strings that can be used in our URL patterns for easy creation of pretty URLs or search engine-friendly URLs.&lt;/p&gt;

&lt;p&gt;A slug is the part of a URL which identifies a particular page on a website in an easy to read form. A slug usually contains only letters, numbers, underscores or hyphens. They’re generally used in URLs.”&lt;/p&gt;

&lt;p&gt;Take a look at these two URLs below for an article title: &lt;strong&gt;“How to Code”&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://example.com/article/1"&gt;http://example.com/article/1&lt;/a&gt;/&lt;/li&gt;
&lt;li&gt;&lt;a href="http://example.com/article/how-to-code-1/"&gt;&lt;strong&gt;http://example.com/article/how-to-code-1/&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You would agree with me that the second URL looks pretty and it conveys a meaning which is related to the content of our article.&lt;/p&gt;

&lt;p&gt;In this article, I will be showing you how to SEO friendly URL patterns in Django that looks like the second URL above.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;I will be assuming you are familiar with Django installation and setup, so I won’t be talking about how to do that.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To get started, create a virtual environment, install Django, create a Django project and create a Django app called “blog” or whatever you want.&lt;/p&gt;

&lt;p&gt;For my own example, I will be creating a Django App called “blog” which I will use to create a simple blog App which has an SEO-friendly URL.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example App
&lt;/h3&gt;

&lt;p&gt;My Blog App will consist of an Article Model, a view and a URL Pattern.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;In blog/models.py&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class BlogPost(models.Model):

    title = models.CharField(max\_length=255)

    pub\_date = models.DateTimeField()

    body = models.TextField()

    image = models.ImageField(null=True, blank=True)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;In blog/views.py&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from django.views.generic import ListView, DetailView

from .models import BlogPost


class BlogListView(ListView):

    model = BlogPost

    context\_object\_name = ‘blog\_list’

    template\_name = ‘blog/blog.html’


class BlogDetailView(DetailView):

    model = BlogPost

    context\_object\_name = ‘blog’

    template\_name = ‘blog/blog\_post.html’

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;In blog/urls.py&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from django.urls import path

from . import views

urlpatterns = [

    path(‘’, views.BlogListView.as\_view(), name=’blog\_home’),

    path(‘article/&amp;lt;int:pk&amp;gt;/’, views.BlogDetailView.as\_view(), name=’blog\_post’),

]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Follow the steps below to create your pretty URLs.
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Use SlugField in the Model
&lt;/h3&gt;

&lt;p&gt;There is a special model Field type in Django for slugs: &lt;a href="https://docs.djangoproject.com/en/2.1/ref/models/fields/#slugfield"&gt;SlugField&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Create a field named slug with type: &lt;em&gt;SlugField&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;In blog/models.py&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from django.db import models

from django.urls import reverse


class BlogPost(models.Model):

    title = models.CharField(max\_length=255)

    pub\_date = models.DateTimeField()

    body = models.TextField()

    image = models.ImageField(null=True, blank=True)

    slug = models.SlugField(default=’’, editable=False, max\_length=200, null = False)

    def get\_absolute\_url(self):

        kwargs = {

            ‘pk’: self.id,

            ‘slug’: self.slug

        }

    return reverse(‘job-detail’, kwargs=kwargs)


    def save(self, \*args, \*\*kwargs):

        value = self.title

        self.slug = slugify(value, allow\_unicode=True)

        super().save(\*args, \*\*kwargs)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Before saving the instance of a blog article, we convert the title to a slug with the &lt;a href="https://docs.djangoproject.com/en/2.1/ref/utils/#django.utils.text.slugify"&gt;slugify&lt;/a&gt; Django command, which basically replaces spaces by hyphens and also removes symbols if present.&lt;/p&gt;

&lt;p&gt;As &lt;em&gt;SlugField&lt;/em&gt; inherits from &lt;em&gt;CharField&lt;/em&gt;, it comes with the attribute max_length which handles the maximum length of the string it contains at the database level.&lt;/p&gt;

&lt;p&gt;If we use a &lt;em&gt;SlugField&lt;/em&gt; without specifying its max_length attribute, it gets the value of 50 by default, which can lead to problems when we generate the string from a bigger max_length field.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So the trick is to make the title and the slug use the same max_length or make the slug field use a lesser max_lenght.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;In blog/urls.py&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;…
path(‘article/&amp;lt;str:slug&amp;gt;-&amp;lt;int:pk&amp;gt;/’, ArticleDetailView.as\_view() , name=’article-detail’)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;In blog/views.py&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from django.views.generic import ListView, DetailView

from .models import BlogPost


class BlogListView(ListView):

    model = BlogPost

    context\_object\_name = ‘blog\_list’

    template\_name = ‘blog/blog.html’


class BlogDetailView(DetailView):

    model = BlogPost

    context\_object\_name = ‘blog’

    template\_name = ‘blog/blog\_post.html’
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;OR&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can use a function-based view and pass in the post slug and post PK into the view.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def blogPost(request, slug, pk):

    blog = BlogPost.get\_jobs(id=pk)

    context = {

        “blog”: blog,

    }

    return render(request, ‘article\_details.html’, context)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;In the above example, I am fetching the blog post using the “pk” which is a unique number attached to each data added into your database, fetching data via the “pk” is more reliable and I love using this approach.&lt;/p&gt;

&lt;p&gt;In this case, the slug is just being used in the URL and nowhere else, the slug has nothing to do with fetching the article from our database.&lt;/p&gt;

&lt;p&gt;So, that’s it.&lt;/p&gt;

&lt;p&gt;If you follow the above steps, you should have a pretty URL for your articles right now.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Before you go, don’t forget to share this article on your social media profiles, someone might find it useful.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;




</description>
      <category>djangoseo</category>
      <category>djangourl</category>
      <category>seo</category>
      <category>django</category>
    </item>
    <item>
      <title>How to Install PostgreSQL on Ubuntu, Linux &amp; Mac</title>
      <dc:creator>Joseph Adediji</dc:creator>
      <pubDate>Fri, 08 May 2020 09:50:19 +0000</pubDate>
      <link>https://dev.to/josylad/how-to-install-postgresql-on-ubuntu-linux-mac-9k2</link>
      <guid>https://dev.to/josylad/how-to-install-postgresql-on-ubuntu-linux-mac-9k2</guid>
      <description>&lt;p&gt;So, recently I had to reinstall my OS and I found myself struggling with setting up my development environment which includes PostgreSQL on the new installation and as you might have known, I work a lot with PostgreSQL and I had to install it before I could do anything.&lt;/p&gt;

&lt;p&gt;fortunately, I was able to set up everything &lt;strong&gt;perfectly&lt;/strong&gt; and get my Django projects running within a short time.&lt;/p&gt;

&lt;p&gt;SQL Databases like PostgreSQL store data in tables which are different items in an application. Tables have a fixed number of columns and a variable number of rows.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9sU39j1M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2APY24xlr4TpOkXW04HUoqrQ.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9sU39j1M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2APY24xlr4TpOkXW04HUoqrQ.jpeg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Below is a quick guide that should help anyone running on a Linux to get their PostgreSQL installation working with no hassles.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Please follow the steps carefully in order to avoid any error!&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Installation
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1. Ubuntu
&lt;/h4&gt;

&lt;p&gt;To Install Postgres on Ubuntu we need to run the following commands in our terminal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo apt-get update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To install Postgres&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo apt-get install postgresql postgresql-contrib libpq-dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Enter &lt;strong&gt;y&lt;/strong&gt; when prompted “Do you want to continue? &lt;strong&gt;[Y/n]&lt;/strong&gt;” and wait as the installation completes.&lt;/p&gt;

&lt;h4&gt;
  
  
  Defining a user role
&lt;/h4&gt;

&lt;p&gt;Postgres uses “roles” to aid in authentication and authorization. By default, Postgres creates a Postgres user and is the only user who can connect to the server.&lt;/p&gt;

&lt;p&gt;We want to create our own superuser role to connect to the server.&lt;/p&gt;

&lt;p&gt;For those running on elementary or parrot, run the following command first;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo service postgresql start

$ sudo -u postgres createuser --superuser $USER
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Enter your desired password when prompted.&lt;/p&gt;

&lt;p&gt;We then have to create a database with that $USER login name, this is what Postgres expects as default.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo -u postgres createdb $USER
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Navigate to your home directory and enter the following command to create the .psql_history in order to save your history:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ touch .psql\_history
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can now connect to the Postgres server by typing :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ psql
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  2. Mac
&lt;/h4&gt;

&lt;p&gt;Homebrew makes it really easy to install Postgres. Just run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ brew install postgres
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After it finishes installing, you’ll need to configure your computer a bit. First, you need to tell Postgres where to find the database cluster where your databases will be stored:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ echo "export PGDATA=/usr/local/var/postgres" &amp;gt;&amp;gt; ~/.bash\_profile
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command will help some programs find Postgres more easily:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ echo "export PGHOST=/tmp" &amp;gt;&amp;gt; ~/.bash\_profile
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To load these configuration changes, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ source ~/.bash\_profile
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To start the Postgres server, simply run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ postgres
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You’ll have to leave that window open while you need the server. To stop the server, press Ctrl + C (_not_ Cmd + C). If you want Postgres to boot at startup and run in the background, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ln -sfv /usr/local/opt/postgresql/\*.plist ~/Library/LaunchAgents
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And to start it now (since it won’t boot automatically until you restart your computer), run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ pg\_ctl start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;create a default database with your computer’s username:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ createdb $USER
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And you’re done.&lt;/p&gt;

</description>
      <category>ubuntu</category>
      <category>postgres</category>
      <category>linux</category>
      <category>mac</category>
    </item>
    <item>
      <title>How to deploy Angular Apps to GitHub Pages (gh-pages)</title>
      <dc:creator>Joseph Adediji</dc:creator>
      <pubDate>Sat, 14 Sep 2019 06:36:54 +0000</pubDate>
      <link>https://dev.to/josylad/how-to-deploy-angular-apps-to-github-pages-gh-pages-6od</link>
      <guid>https://dev.to/josylad/how-to-deploy-angular-apps-to-github-pages-gh-pages-6od</guid>
      <description>&lt;p&gt;Using 2 different methods with angular-cli-ghpages&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--a_4c2gvA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2A_MzyRrvtSudak_DHxjIwTg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--a_4c2gvA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2A_MzyRrvtSudak_DHxjIwTg.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Deploying an Angular App to Github pages can be a little trickish because angular applications are not like any other web apps built with HTML, CSS and JS which you can build on your local computer and simply push to Github pages.&lt;/p&gt;

&lt;p&gt;When you build an Angular project using the angular CLI, you need to take some extra steps to get your application ready for deployment.&lt;/p&gt;

&lt;p&gt;I will be sharing with you two methods for deploying an Angular App to gh-pages (Github Pages).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;P.S.&lt;/strong&gt;  — Please note that after deploying your angular app to github pages, it may take about 10–30 secs for it to actually show up, sometimes Github Pages doesn’t load up your site instantly, so try reloading the page after few seconds of deploying your angular website to Github pages to check if it works.&lt;/p&gt;

&lt;h3&gt;
  
  
  Method 1
&lt;/h3&gt;

&lt;p&gt;Below is the first method for deploying an Angular App to Github pages.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 1
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Create your Github Repository:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The first thing to do if you want to deploy your Angular App on Github pages is to create a repo for your project.&lt;/p&gt;

&lt;p&gt;After creating the repo, commit all your changes and push your project files to the repository you have created.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 2
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Install Angular CLI gh-pages:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There is a tool at your disposal that you can use to easily deploy your angular app to gh-pages, the angular-cli-pages tool.&lt;/p&gt;

&lt;p&gt;The angular-cli-pages tool is used as a command on the angular CLI for the purpose of deployment. To install it, let us run this command on our terminal:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;$ npm i angular-cli-ghpages — save-dev&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; This command will install angular-cli-ghpages globally in your operating system. You don’t have to install it again in case you need to use it in the future.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 3
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Run Build :&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before you can deploy an Angular App, you need to build your angular app for use in production.&lt;/p&gt;

&lt;p&gt;This simply means configuring your app to be useable on a remote server like gh-pages.&lt;/p&gt;

&lt;p&gt;Usually, while creating your App, you had it running on your local server, but unfortunately the configuration for the local server will not serve the application when it is deployed on the gh-pages remote server, which is why you need to build your app.&lt;/p&gt;

&lt;p&gt;Run this command on your terminal to build the application:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ng build --prod --base-href "https://GithubUserName.github.io/GithubRepoName/"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Make sure you put in your Github username in “GithubUserName” and the repository name you created in “GithubRepoName” sections of the URL.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 4
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Deploy to gh-pages:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After building the App, you can now deploy it to Github Pages using the angular-cli-ghpages tool.&lt;/p&gt;

&lt;p&gt;Run the command below in your terminal to deploy the App:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;$ npx angular-cli-ghpages — dir=dist/Project-name&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Make sure you put the name of the project in the place of “Project-name” in the command above.&lt;/p&gt;

&lt;p&gt;You can find this in the &lt;strong&gt;angular.json file under defaultProject&lt;/strong&gt; which is at the bottom of the file. If the project name is wrong, your App will not work; so if you are seeing any errors, &lt;strong&gt;check the angular.json to confirm if you used the correct project name.&lt;/strong&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 6
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Visit the App Page:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Visit the URL to your App gh-pages, it is the same URL you created earlier on our terminal; &lt;a href="https://githubusername.github.io/GithubRepoName/"&gt;&lt;strong&gt;https://GithubUserName.github.io/GithubRepoName/&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You should see your application running remotely, which means it has successfully been published on gh-pages.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QM99lVao--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/300/1%2A8qz-KpQ9537NNApkl6F0kg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QM99lVao--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/300/1%2A8qz-KpQ9537NNApkl6F0kg.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Method 2
&lt;/h3&gt;

&lt;p&gt;Below is the first method for deploying an Angular App to Github pages.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 1
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Create your Github Repository:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The first thing to do if you want to deploy your Angular App on Github pages is to create a repo for your project.&lt;/p&gt;

&lt;p&gt;After creating the repo, commit all your changes and push your project files to the repository you have created.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 2
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Create a gh-pages branch on your local machine:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You need to create a gh-pages branch from your master branch on your computer and checkout to the branch.&lt;/p&gt;

&lt;p&gt;Run the command below in your terminal to create a gh-pages branch:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;$ git branch gh-pages&lt;/p&gt;

&lt;p&gt;$ git checkout gh-pages&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  Step 3
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Build your App:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Checkout out to your gh-pages branch and build your Angular app in this branch.&lt;/p&gt;

&lt;p&gt;Run the commands below in your terminal to build your app:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;$ git checkout -b gh-pages&lt;/p&gt;

&lt;p&gt;$ git push origin gh-pages&lt;/p&gt;

&lt;p&gt;$ npm install -g angular-cli-ghpages&lt;/p&gt;

&lt;p&gt;$ ng build — prod — base-href https://[username].github.io/[repo]/&lt;/p&gt;

&lt;p&gt;$ ngh — dir=dist/[project-name]&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Make sure you put your “username”, “repo name” and the name of the project in the place of “Project-name” in the commands above.&lt;/p&gt;

&lt;p&gt;You can find this in the &lt;strong&gt;angular.json file under defaultProject&lt;/strong&gt; which is at the bottom of the file. If the project name is wrong, your App will not work; so if you are seeing any errors, &lt;strong&gt;check the angular.json to confirm if you used the correct project name.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;** You only need to set the “ — base-href” flag once, next time you make changes and build the project you can simply run:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;$ ng build — prod&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  Step 4
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Visit the App Page:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Visit the URL to your Angular app gh-pages, it is the same URL you created earlier on our terminal; &lt;a href="https://githubusername.github.io/GithubRepoName/"&gt;&lt;strong&gt;https://UserName.github.io/RepoName/&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You should see your application running remotely, which means it has successfully been published on gh-pages.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;I hope you were able to deploy your Angular App to Github pages using either of the above procedures. If you have any questions or suggestions, kindly drop them in the comments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Before you go, don’t forget to share this article on your social media profiles, someone might find it useful.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;




</description>
      <category>ghpages</category>
      <category>angular</category>
      <category>githubpages</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to Link Your Angular App to MDBootstrap</title>
      <dc:creator>Joseph Adediji</dc:creator>
      <pubDate>Sun, 25 Aug 2019 07:47:46 +0000</pubDate>
      <link>https://dev.to/josylad/how-to-link-your-angular-app-to-mdbootstrap-1and</link>
      <guid>https://dev.to/josylad/how-to-link-your-angular-app-to-mdbootstrap-1and</guid>
      <description>&lt;p&gt;Angular is one of the best frameworks out there and it can be used to do more awesome stuff when integrated with various third party tools and frameworks like MDBootstrap.&lt;/p&gt;

&lt;p&gt;Before we proceed, I want you to know that there is a slight difference between Bootstrap and MDBootstrap.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is MD Bootstrap
&lt;/h3&gt;

&lt;p&gt;MDBootstrap simply means Material Design Bootstrap; it is an extended version of the original Bootstrap CSS framework. It is a version of Bootstrap inspired by Material Designs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;MDBootstrap takes Bootstrap a step further with more awesome styles and CSS effects that can be integrated into your Angular App.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Personally, I am a big fan of MDBootstrap and I use it a lot for my projects.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Just like with the original Bootstrap, MDBootstrap has numerous methods by which you can integrate it into your Applications, some of these methods are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Downloading MDBootstrap to your local machine and including it in your App folder.&lt;/li&gt;
&lt;li&gt;Using the MDBootstrap CDN links.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; MDBootstrap is built on Bootstrap Framework, so all features, styles and functionalities available in the original bootstrap works out of the box if you integrate the MDBootstrap CDN in your Apps.&lt;/p&gt;

&lt;p&gt;In this article, our focus is on using the MDBootstrap CDN in our Angular Apps.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to Integrate MDBootstrap CDN in Angular Apps
&lt;/h3&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Step 1.&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Go to the MDBootstrap website (&lt;a href="https://mdbootstrap.com/"&gt;https://mdbootstrap.com/&lt;/a&gt;) and click on the &lt;strong&gt;“Getting started”&lt;/strong&gt; Button at the top of the page. This should take you to the getting started with MDbootstrap page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pKbN2VdA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AzAO1eZeDWgxKE47HJApD0A.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pKbN2VdA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AzAO1eZeDWgxKE47HJApD0A.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Step 2.&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;On the getting started page, scroll down to the “ &lt;strong&gt;Get it&lt;/strong&gt; ” section where you will find the various MDBootstrap integration methods. Click on the “ &lt;strong&gt;GITHUB,CDN, NPM&lt;/strong&gt; ” version.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--agHk3V03--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2Aul5aDGJgKRSWcTVDqtR96w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--agHk3V03--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2Aul5aDGJgKRSWcTVDqtR96w.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Step 3.&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Once you click on the button above, you will get a popup asking you to choose your desired method of integration, just &lt;strong&gt;select CDN links&lt;/strong&gt; and this should take you to a new page where you will get the MDBootstrap CDN Links.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SO4KpU0A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2ATZULXJQ9ZMX09hGYxByLEQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SO4KpU0A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2ATZULXJQ9ZMX09hGYxByLEQ.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Step 4&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;On the MD Bootstrap CDN page, scroll down a little to the section where you will find the MDBootstrapCDN CSS links and also the JS links.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gjOniTNY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2APJapmDsgM3McP4xl6fWqbw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gjOniTNY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2APJapmDsgM3McP4xl6fWqbw.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Copy the CSS Links provided, &lt;strong&gt;make sure you copy all the links correctly&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Step 5.&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Open your Angular App in your favorite code editor (Atom, VS code, Sublime etc).&lt;/p&gt;

&lt;p&gt;Look for the &lt;strong&gt;“index.html”&lt;/strong&gt; in your angular App root folder (src/app) and open it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--y-VwOONd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/904/1%2Ah-M2r9_BqY5WFVfdMLYOyw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--y-VwOONd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/904/1%2Ah-M2r9_BqY5WFVfdMLYOyw.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Step 4.&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Find the closing head tag ( &lt;strong&gt;&amp;lt;/head&amp;gt;&lt;/strong&gt; ) in the &lt;strong&gt;index.html&lt;/strong&gt; file and paste the link you got from Bootstrap website right above the closing head tags.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; I will recommend that you integrate both the MDBootstrapCDN CSS links and JS links because some of the MDbootstrap CSS functions rely on Javascript/Jquery for them work.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--V3W_TF3x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AUHolIv7Y8p29mzw_C3zARA.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--V3W_TF3x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AUHolIv7Y8p29mzw_C3zARA.jpeg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Step 5.&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Add some MDBootstrap styles and classes to your App to test if it works.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Step 6.&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;You made it! Nothing more to do.&lt;/p&gt;

&lt;p&gt;By now, you should have successfully linked your Angular App to MDBootstrap.&lt;/p&gt;

&lt;h3&gt;
  
  
  Final note.
&lt;/h3&gt;

&lt;p&gt;If you have followed the steps above correctly, your angular app should work perfectly with MDBootstrap; if it doesn’t work, go through the steps again to check if you missed something and make sure you copy &amp;amp; pasted the correct MDBootstrap CDN links into your App index.html file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;If you found this helpful, Kindly share it with your friends/group.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;




</description>
      <category>bootstrap</category>
      <category>javascript</category>
      <category>frontenddevelopment</category>
      <category>mdbootstrap</category>
    </item>
    <item>
      <title>How to Link Your Angular App to Bootstrap via BootstrapCDN</title>
      <dc:creator>Joseph Adediji</dc:creator>
      <pubDate>Sun, 25 Aug 2019 07:00:26 +0000</pubDate>
      <link>https://dev.to/josylad/how-to-link-your-angular-app-to-bootstrap-via-bootstrapcdn-12fh</link>
      <guid>https://dev.to/josylad/how-to-link-your-angular-app-to-bootstrap-via-bootstrapcdn-12fh</guid>
      <description>&lt;p&gt;Angular is no doubt a good frontend framework and it is very useful if you are building large /enterprise projects and the angular CLI also gives you a quick jumpstart that allows you to get started with building your project as fast as possible.&lt;/p&gt;

&lt;p&gt;Well, this article is not really about the angular framework itself rather it is about extending the capabilities of angular with Bootstrap.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Bootstrap?
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;“Bootstrap is a free and open-source CSS framework directed at responsive, mobile-first front-end web development. It contains CSS- and JavaScript-based design templates for typography, forms, buttons, navigation and other interface components.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In simple terms, Bootstrap is a CSS framework that helps you build beautiful websites with ease.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;There are two major ways of using Bootstrap in your applications, which are:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Downloading the bootstrap compiled CSS and Javascript source codes to your local machine.&lt;/li&gt;
&lt;li&gt;Using the BootstrapCDN.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;In this article we will focus on the latter method, using the Bootstrap CDN links.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How to Integrate Bootstrap CDN in Angular Apps
&lt;/h3&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Step 1.&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Go to the Bootstrap website (&lt;a href="https://getbootstrap.com/"&gt;https://getbootstrap.com&lt;/a&gt;) and click on the &lt;strong&gt;“Get started”&lt;/strong&gt; Button. This should take you to the getting started with bootstrap page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--77dB8fwf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2A7DlRffUtj5BKy5vJkN6dpQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--77dB8fwf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2A7DlRffUtj5BKy5vJkN6dpQ.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Step 2.&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;On the getting started page, scroll down a little to the “Quick Start” section where you will find the BootstrapCDN CSS link and also the JS links.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uLVDI4pJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AjQpV-kRp6CjDBVtj_44utQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uLVDI4pJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AjQpV-kRp6CjDBVtj_44utQ.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Copy the CSS Link provided, &lt;strong&gt;make sure you copy it correctly&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Step 3.&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Open your Angular App in your favorite code editor (Atom, VS code, Sublime etc).&lt;/p&gt;

&lt;p&gt;Look for the &lt;strong&gt;“index.html”&lt;/strong&gt; in your angular App root folder (src/app) and open it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--y-VwOONd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/904/1%2Ah-M2r9_BqY5WFVfdMLYOyw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--y-VwOONd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/904/1%2Ah-M2r9_BqY5WFVfdMLYOyw.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Step 4.&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Find the closing head tag ( &lt;strong&gt;&amp;lt;/head&amp;gt;&lt;/strong&gt; ) in the index.html file and paste the link you got from Bootstrap website right above the closing head tags.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--V3W_TF3x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AUHolIv7Y8p29mzw_C3zARA.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--V3W_TF3x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AUHolIv7Y8p29mzw_C3zARA.jpeg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; I will recommend that you integrate both the Bootstrap CSS link and JS link because some of the bootstrap CSS functions rely on Javascript/Jquery for them work.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Step 5.&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Add some Bootstrap styles and classes to your App to test if it works. You can find many styles on the Bootstrap website.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Step 6.&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Nothing more to do.&lt;/p&gt;

&lt;p&gt;By now, you should have successfully linked your Angular App to Bootstrap.&lt;/p&gt;

&lt;h3&gt;
  
  
  Final note.
&lt;/h3&gt;

&lt;p&gt;If you followed the steps above correctly, your Angular app should work perfectly with Bootstrap; if it doesn’t work, go through the steps again to check if you missed something and make sure you copy &amp;amp; pasted the correct Bootstrap CDN links in your App.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;If you found this helpful, Kindly share it with your friends/group.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;




</description>
      <category>coding</category>
      <category>bootstrap</category>
      <category>angular</category>
      <category>css</category>
    </item>
    <item>
      <title>Are Coding Bootcamps worth it?</title>
      <dc:creator>Joseph Adediji</dc:creator>
      <pubDate>Thu, 08 Aug 2019 08:40:04 +0000</pubDate>
      <link>https://dev.to/josylad/are-coding-bootcamps-worth-it-kpk</link>
      <guid>https://dev.to/josylad/are-coding-bootcamps-worth-it-kpk</guid>
      <description>&lt;p&gt;If you are involved in Tech or plan to get into Tech or software development, I believe you must have heard the phrase “coding bootcamp” and you may be wondering if it is worth the hype!&lt;/p&gt;

&lt;p&gt;Well, I am going to help you clarify your doubts in this story!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ONhWbgr1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/268/0%2AE67KBnS3r3F3FRq0" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ONhWbgr1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/268/0%2AE67KBnS3r3F3FRq0" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What the Heck is a coding bootcamp?
&lt;/h3&gt;

&lt;p&gt;Well for the uninitiated:&lt;/p&gt;

&lt;p&gt;A coding bootcamp is a technical training program that teaches the programming skills that employers look for. Coding bootcamps enable students with little coding proficiency to focus on the most important aspects of coding and immediately apply their new coding skills to solve real-world problems.&lt;/p&gt;

&lt;p&gt;In other words, &lt;em&gt;Coding bootcamps are intensive programs of software development. It is like a marathon for learning coding, a non-stop learning approach to mastering coding within a short period of time.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In this article, I am going to share with you my experience in a 5-weeks coding bootcamp that I just completed, &lt;strong&gt;this 5-week long bootcamp was focused on making us a front-end developer&lt;/strong&gt; and I will be sharing the pros and cons of attending such bootcamp based on my own experience.&lt;/p&gt;

&lt;h3&gt;
  
  
  My Story
&lt;/h3&gt;

&lt;p&gt;Well, I have always loved Tech, digital marketing and all sorts that comes with it but I have never really been able to perfect my coding skills; I build websites using CMS like WordPress but I believed I could be more, so I decided to try a coding bootcamp.&lt;/p&gt;

&lt;p&gt;Of course, I have a bunch of books on HTML, CSS, JavaScript and so on, even I once paid for sitepoint premium (thrice I guess) and still couldn’t learn anything solid, so I figured out that reading ebooks alone in a dark room might not be the best way for me to learn coding.&lt;/p&gt;

&lt;p&gt;I needed to be in a learning environment, among people who will motivate and encourage me to learn as quickly as possible and so, I decided to attend a coding bootcamp.&lt;/p&gt;

&lt;p&gt;I had learned of a particular coding school in Nairobi, Kenya two years before (2017), so I checked them out again and decided to pack my bags and leave Nigeria for Nairobi to partake in this coding bootcamp.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Yea, that’s right! I traveled to another country to learn!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That said, I would like to start by sharing with you the the pros/benefits of attending a coding bootcamp based on my experience.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pro 1: Fast Learning
&lt;/h3&gt;

&lt;p&gt;I discovered that due to the fact that I had 5 weeks to master front-end development with daily contents to finish up, I had to learn pretty fast; for each day in the bootcamp, there are topics and concepts to master as well as &lt;strong&gt;practice exercises which must be done!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Y70CBkG_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/0%2A5SBm8SghalNWVo07" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Y70CBkG_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/0%2A5SBm8SghalNWVo07" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Photo by&lt;a href="https://unsplash.com/@harleydavidson?utm_source=medium&amp;amp;utm_medium=referral"&gt;Harley-Davidson&lt;/a&gt; on &lt;a href="https://unsplash.com?utm_source=medium&amp;amp;utm_medium=referral"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Before the start of the bootcamp, I had next to zero knowledge about what Git does and how to effectively use Github version control but after 2 days in the bootcamp, I was already creating Git Repos, forking Repos, creating branches, merging branches and having fun with Git.&lt;/p&gt;

&lt;p&gt;Also, by the second day, I was comfortable with using the Terminal (command line interface) to make directories, create files, open and install programs and so much more!&lt;/p&gt;

&lt;p&gt;I was doing a bunch of things I couldn’t dream of a week earlier, I was like a f**king Ninja and I was able to figure all these out within 2–3 days.&lt;/p&gt;

&lt;p&gt;So, when it comes to speed and fast learning, I believe coding bootcamps will surely help you.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pro 2: Less Distractions
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yz97piyV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/0%2Ayf3e4_-yEVD700X8" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yz97piyV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/0%2Ayf3e4_-yEVD700X8" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Photo by&lt;a href="https://unsplash.com/@chaseelliottclark?utm_source=medium&amp;amp;utm_medium=referral"&gt;Chase Clark&lt;/a&gt; on &lt;a href="https://unsplash.com?utm_source=medium&amp;amp;utm_medium=referral"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Coding bootcamps does not give room for distractions. When you get into a coding bootcamp, you can feel the seriousness and “no-messing around” attitude in the atmosphere, people paid a lot of money to be there, so no one is there to joke around (except for some few); you are there for a serious work and so are other people present there.&lt;/p&gt;

&lt;p&gt;In a bootcamp, you are among people with similar goals, people who are actually serious about coding and learning new technologies with zero tolerance for distraction; so focus will be the order of the day!&lt;/p&gt;

&lt;p&gt;And less distraction will definitely result in faster learning for you.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pro 3: Support
&lt;/h3&gt;

&lt;p&gt;Coding bootcamps gives you access to physical and guaranteed support.&lt;/p&gt;

&lt;p&gt;Usually in a bootcamp, you will have mentors who are more experienced developers ready to help you out whenever you are stuck, this keeps your mind at rest and makes you feel you are not alone; it also allows you to experiment and try things out because you know there is someone who can help out!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MX3Fz7sP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/0%2A2EPVyZnGRXX1ezMQ" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MX3Fz7sP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/0%2A2EPVyZnGRXX1ezMQ" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Photo by&lt;a href="https://unsplash.com/@evertonvila?utm_source=medium&amp;amp;utm_medium=referral"&gt;Everton Vila&lt;/a&gt; on &lt;a href="https://unsplash.com?utm_source=medium&amp;amp;utm_medium=referral"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, whenever you are not getting a concept or some of your codes are not working, you can easily access help and resolve it ASAP without slowing down your learning.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pro 4: Atmosphere and Motivation
&lt;/h3&gt;

&lt;p&gt;The atmosphere at a coding bootcamp is usually very different, it is like you are in the midst of like minds working together to build the next big thing.&lt;/p&gt;

&lt;p&gt;The atmosphere creates unmatched motivation for everyone, the atmosphere keeps you going even when you feel tired.&lt;/p&gt;

&lt;p&gt;When you feel like quitting, just look around the room to see fellow boot campers; younger and older people from all walks of life grinding hard to achieve their dream of becoming a software developer and you will immediately find the strength to keep going!&lt;/p&gt;

&lt;h3&gt;
  
  
  Pro 5: Team Work
&lt;/h3&gt;

&lt;p&gt;While at the bootcamp, we were encouraged to learn and code in pairs and I believe this is actually a good thing. So, you pick a partner, you sit together and start learning the day’s content; asking questions and helping each other out.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qjq3lblr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/0%2A_ex5Zih2WLv-d0zA" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qjq3lblr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/0%2A_ex5Zih2WLv-d0zA" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My Group during the bootcamp&lt;/p&gt;

&lt;p&gt;I discovered that coding is much more fun in pairs or in groups, you get to share ideas and get different opinions and explanations from your peers regarding unclear concepts or topics.&lt;/p&gt;

&lt;p&gt;You also get to meet and network with people from various walks of life, you learn how to associate with other people from different tribes, religion and ethnicity and this is one important skill in today’s workplace.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pro 6: Practice Projects
&lt;/h3&gt;

&lt;p&gt;During coding bootcamps, you will get to do a lot of practice projects.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Iwa1BdCM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/0%2A4IPedjApHkFkSgxu" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Iwa1BdCM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/0%2A4IPedjApHkFkSgxu" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Photo by&lt;a href="https://unsplash.com/@ricaros?utm_source=medium&amp;amp;utm_medium=referral"&gt;Danial RiCaRoS&lt;/a&gt; on &lt;a href="https://unsplash.com?utm_source=medium&amp;amp;utm_medium=referral"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We had weekly projects which has to be done over the weekend and submitted by midnight on Sunday. This ensures that everyone usually gets to practice whatever they have learnt during the week and code their own individual projects to improve their learning and mastering any new concepts that has been learnt.&lt;/p&gt;

&lt;p&gt;Believe me, the major secret to becoming a good software developer or programmer is &lt;strong&gt;“Practice”&lt;/strong&gt; , if you don’t practice, you cannot improve and coding bootcamps will make sure you practice.&lt;/p&gt;

&lt;p&gt;Your skills development as a software developer depends a lot on practice, building stuff and you will definitely get to do a lot of this at a coding bootcamp.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So, these are some of the pros/benefits that you can derive from a coding bootcamp.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For the cons, I will talk briefly about two of them which I believe are the most important downside of coding bootcamps.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Con 1: Financial Commitment / Cost
&lt;/h3&gt;

&lt;p&gt;I believe the major con or challenge with going for coding bootcamps is the training cost, coding bootcamps are expensive!&lt;/p&gt;

&lt;p&gt;A cheap coding bootcamp cost between $1000 — $2000 depending on the duration and the quality of the training you are getting; some coding bootcamps cost as high as $10,000.&lt;/p&gt;

&lt;p&gt;when you compare this cost (excluding other personal/miscellaneous cost) to the cost of an eBook or online video course, you will discover that there is a very wide margin in the cost.&lt;/p&gt;

&lt;p&gt;But believe me, the value you will usually derive from a coding bootcamp should be worth your investment.&lt;/p&gt;

&lt;h3&gt;
  
  
  Con 2: Intensive/Immersive Training
&lt;/h3&gt;

&lt;p&gt;Coding bootcamps are meant to be an intensive and immersive training; the truth is you will not have the time to do anything else when you are in a coding bootcamp.&lt;/p&gt;

&lt;p&gt;You will spend most of your time at the coding bootcamp. Usually, you will spend at least 12 hours daily at the bootcamp and this means you will not be able to combine it with anything else.&lt;/p&gt;

&lt;p&gt;If you are working, you might have to take a break for the duration of the bootcamp; you might also have to be absent at the pubs and bars for a while!&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Are coding bootcamps worth it?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Absolutely Yes!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you can afford it and if you have the time, I will highly recommend you go for it.&lt;/p&gt;

&lt;p&gt;Coding bootcamps will supercharge your learning and push you closer to your dream of becoming a software developer!&lt;/p&gt;

&lt;h4&gt;
  
  
  Final Note
&lt;/h4&gt;

&lt;p&gt;what do you think of coding bootcamps?&lt;/p&gt;

&lt;p&gt;Have you attended one? What was your experience like?&lt;/p&gt;

&lt;p&gt;We will love to hear your views in the comment section.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;P.S. &lt;/strong&gt; — if you have a minute, kindly share this article with your friends and tribes.&lt;/p&gt;

&lt;p&gt;Thank you!&lt;/p&gt;




</description>
      <category>bootcamp</category>
      <category>programming</category>
      <category>coding</category>
      <category>webdevbootcamps</category>
    </item>
  </channel>
</rss>
