<?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: caglarcercinlidev</title>
    <description>The latest articles on DEV Community by caglarcercinlidev (@caglarcercinli1).</description>
    <link>https://dev.to/caglarcercinli1</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%2F830611%2F40c5e1bc-e13d-427c-b539-c9bb1d7a9f6f.jpg</url>
      <title>DEV Community: caglarcercinlidev</title>
      <link>https://dev.to/caglarcercinli1</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/caglarcercinli1"/>
    <language>en</language>
    <item>
      <title>HOW TO CREATE A JAR FILE ON A SPRING/MAVEN PROJECT</title>
      <dc:creator>caglarcercinlidev</dc:creator>
      <pubDate>Tue, 19 Apr 2022 21:25:59 +0000</pubDate>
      <link>https://dev.to/caglarcercinli1/how-to-create-a-jar-file-on-a-springmaven-project-iba</link>
      <guid>https://dev.to/caglarcercinli1/how-to-create-a-jar-file-on-a-springmaven-project-iba</guid>
      <description>&lt;p&gt;A jar file is in fact a server-runnable code.&lt;br&gt;
On terminal execute this command:&lt;br&gt;
&lt;code&gt;mvn package&lt;/code&gt;&lt;br&gt;
This command will build the project, run the tests and create a jar file. So be sure that all tests are passing.&lt;/p&gt;

&lt;p&gt;After that, check the target folder, jar file will be there.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--84QKhSFz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eitkg6ii91nxgtwnsiq6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--84QKhSFz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eitkg6ii91nxgtwnsiq6.png" alt="Image description" width="346" height="207"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now it is time to run this jar file. Command:&lt;br&gt;
&lt;code&gt;java -jar &amp;lt;name&amp;gt;.jar&lt;/code&gt;&lt;br&gt;
With this command, the application will be running on the specified localhost port (default 8080). You can test it.&lt;/p&gt;

&lt;p&gt;Happy coding with no errors!&lt;/p&gt;

</description>
      <category>spring</category>
      <category>java</category>
      <category>maven</category>
    </item>
    <item>
      <title>HOW TO RUN A SQL FILE AND CREATE A DATABASE</title>
      <dc:creator>caglarcercinlidev</dc:creator>
      <pubDate>Thu, 14 Apr 2022 17:04:35 +0000</pubDate>
      <link>https://dev.to/caglarcercinli1/how-to-run-a-sql-file-and-create-a-database-4ka8</link>
      <guid>https://dev.to/caglarcercinli1/how-to-run-a-sql-file-and-create-a-database-4ka8</guid>
      <description>&lt;p&gt;It is not always a good practice to insert data with a psql command line. Creating a sql file and running it is sometimes easier.&lt;/p&gt;

&lt;p&gt;First we create a file with .sql extension (with notepad for example).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DROP TABLE products;

create table products (id serial primary key, name varchar (50) not null, price varchar (50) not null);
 insert into products (name, price) values ('hamburger','10');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why DROP TABLE? &lt;br&gt;
It would delete the previous table and rewrite it, otherwise it would cause en error.&lt;br&gt;
Then we log into psql.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;run \i fastfoodshop.sql&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;It is important to indicate the correct place of the file.&lt;/p&gt;

&lt;p&gt;After that, check table and entries.&lt;/p&gt;

&lt;p&gt;Wish you an easy coding!&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>ubuntu</category>
    </item>
    <item>
      <title>CREATE A TABLE ON A POSTGRESQL DATABASE</title>
      <dc:creator>caglarcercinlidev</dc:creator>
      <pubDate>Thu, 14 Apr 2022 16:51:01 +0000</pubDate>
      <link>https://dev.to/caglarcercinli1/create-a-table-on-a-postgresql-database-39bl</link>
      <guid>https://dev.to/caglarcercinli1/create-a-table-on-a-postgresql-database-39bl</guid>
      <description>&lt;p&gt;First some useful commands:&lt;/p&gt;

&lt;p&gt;list if databases:&lt;br&gt;
&lt;code&gt;\l&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;switch to a database:&lt;br&gt;
&lt;code&gt;\c exampledatabase&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;now it is time to create a table:&lt;br&gt;
    &lt;code&gt;CREATE TABLE products (id serial primary key, name varchar (50) not null, price varchar (50) not null);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;we have a table but no entries, so:&lt;br&gt;
&lt;code&gt;INSERT INTO products (name, price) VALUES ('hamburger','10');&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;to check the tables:&lt;br&gt;
&lt;code&gt;\dt&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;and to see entries on our table:&lt;br&gt;
&lt;code&gt;SELECT * FROM products&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;wish you an easy coding!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yj6waPbC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ejqhb1zvktpuivcsaduh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yj6waPbC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ejqhb1zvktpuivcsaduh.png" alt="Image description" width="802" height="474"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>ubuntu</category>
    </item>
    <item>
      <title>HOW TO CREATE A POSTGRESQL DATABASE ON UBUNTU 20.04</title>
      <dc:creator>caglarcercinlidev</dc:creator>
      <pubDate>Thu, 14 Apr 2022 16:34:20 +0000</pubDate>
      <link>https://dev.to/caglarcercinli1/how-to-create-a-postgresql-database-on-ubuntu-2004-49a0</link>
      <guid>https://dev.to/caglarcercinli1/how-to-create-a-postgresql-database-on-ubuntu-2004-49a0</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1lhqPMz6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h9gsqdertwwiqr0ausuu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1lhqPMz6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h9gsqdertwwiqr0ausuu.png" alt="Image description" width="739" height="484"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First open terminal and&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo apt update&lt;/code&gt;&lt;br&gt;
&lt;code&gt;sudo apt install postgresql postgresql-contrib&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;now you have downloaded necessary libraries. After that:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo -i -u postgres&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This way you are switched to postgres user. and enter your password (of the previous user)&lt;/p&gt;

&lt;p&gt;&lt;code&gt;psql&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;With psql you are ready to perform postgres commands.&lt;/p&gt;

&lt;p&gt;always use &lt;/p&gt;

&lt;p&gt;&lt;code&gt;\q&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;to leave postgres command line.&lt;/p&gt;

&lt;p&gt;Finally, to create a database:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;CREATE DATABASE exampledatabase;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Wish you an easy coding!&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>ubuntu</category>
    </item>
  </channel>
</rss>
