<?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: Israel</title>
    <description>The latest articles on DEV Community by Israel (@aesrael).</description>
    <link>https://dev.to/aesrael</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%2F32180%2F733a23a8-2452-4d59-a4a8-2d9bd2d931ba.png</url>
      <title>DEV Community: Israel</title>
      <link>https://dev.to/aesrael</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aesrael"/>
    <language>en</language>
    <item>
      <title>go-react starter</title>
      <dc:creator>Israel</dc:creator>
      <pubDate>Mon, 22 Jul 2019 22:28:09 +0000</pubDate>
      <link>https://dev.to/aesrael/go-react-starter-5g4h</link>
      <guid>https://dev.to/aesrael/go-react-starter-5g4h</guid>
      <description>&lt;p&gt;For everyone looking to get started with building web apps and auth APIs with go.&lt;/p&gt;

&lt;p&gt;I worked on a go and react project over the weekend to help you get started on authentication with golang, complete with a postgresql database and token based authentication using JWT.&lt;/p&gt;

&lt;p&gt;Here is the url.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/aesrael" rel="noopener noreferrer"&gt;
        aesrael
      &lt;/a&gt; / &lt;a href="https://github.com/aesrael/go-postgres-react-starter" rel="noopener noreferrer"&gt;
        go-postgres-react-starter
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A go, postgres API with basic jwt auth starter, complete with a react frontend
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;GO-React starter&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/aesrael/go-postgres-react-starter.github/logo.png"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Faesrael%2Fgo-postgres-react-starter.github%2Flogo.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is a basic example of a go web server with a react frontend.&lt;/p&gt;
&lt;p&gt;It uses the &lt;a href="https://github.com/gofiber/fiber" rel="noopener noreferrer"&gt;go fiber&lt;/a&gt; framework&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Getting started&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Running locally&lt;/h3&gt;
&lt;/div&gt;
&lt;p&gt;Clone this repository
Download and install &lt;a href="https://golang.org" rel="nofollow noopener noreferrer"&gt;golang&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Download and install &lt;a href="https://www.postgresql.org/download/" rel="nofollow noopener noreferrer"&gt;postgres&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Setup your postgres database, env secrets can be changed in the &lt;a href="https://github.com/aesrael/go-postgres-react-starter./server/.env" rel="noopener noreferrer"&gt;.env&lt;/a&gt; file&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://prabhupant.medium.com/a-complete-guide-to-postgresql-e4d1cefb9866" rel="nofollow noopener noreferrer"&gt;A complete guide to PostgreSQL&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://medium.com/@dan.chiniara/installing-postgresql-for-windows-7ec8145698e3" rel="nofollow noopener noreferrer"&gt;Installing PostgreSQL for Mac, Linux, and Windows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Ensure you have &lt;code&gt;make&lt;/code&gt; installed.&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;make run&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;This will start the go server &amp;amp; the react frontend.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Using docker&lt;/h3&gt;

&lt;/div&gt;
&lt;p&gt;Ensure you have &lt;code&gt;docker&lt;/code&gt; installed&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;make docker-build
make docker-run&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Server is live on &lt;code&gt;:8081&lt;/code&gt; and UI is on &lt;code&gt;:3000&lt;/code&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Endpoints&lt;/h2&gt;

&lt;/div&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;endpoint&lt;/th&gt;
&lt;th&gt;method&lt;/th&gt;
&lt;th&gt;body&lt;/th&gt;
&lt;th&gt;description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;/api/session&lt;/td&gt;
&lt;td&gt;GET&lt;/td&gt;

&lt;td&gt;GET user session&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;/api/login&lt;/td&gt;
&lt;td&gt;POST&lt;/td&gt;
&lt;td&gt;{ email String, password String }&lt;/td&gt;
&lt;td&gt;login user&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;/api/register&lt;/td&gt;
&lt;td&gt;POST&lt;/td&gt;
&lt;td&gt;{ email String, password String, name String }&lt;/td&gt;
&lt;td&gt;register new user&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;




&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Contributing&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;Pull requests are welcome. For major changes, please open an issue first to discuss what you…&lt;/p&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/aesrael/go-postgres-react-starter" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;I hope you like it!&lt;/p&gt;

&lt;p&gt;Contributions are welcome. Cheers🎉&lt;/p&gt;

</description>
      <category>go</category>
      <category>react</category>
      <category>jwt</category>
      <category>postgres</category>
    </item>
  </channel>
</rss>
