Skip to content

A go, gin, and postgres API with jwt auth, complete with a react frontend

Notifications You must be signed in to change notification settings

avastack/go-postgres-jwt-react-starter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GO-React starter

This is a boilerplate/starter for a go and react project.

It uses the go gin framework.

Getting started

Download and install golang

Download and install postgres

Usage

Clone this repository

Use the queries in the server/db/.psql file to setup the database.

Enter the DB creds in the server/config/ file

Navigate to the server directory

> cd server
> go run main.go

This will start the go server.

To start the react app navigate to the client directory

> cd client
> yarn install
> yarn start

Endpoints

  • /session [GET]

  • /register [POST]

       { name String,
         email String,
         password String
       }
  • /login [POST]
       { email String,
         password String
       }
  • /createReset [POST]
       { email String
       }
  • /resetPassword [POST]
       { id Int,
          password String,
          confirm_password String
       }

Routes

  • /login

  • /register

  • /session

  • /createReset

  • /resetPassword

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

About

A go, gin, and postgres API with jwt auth, complete with a react frontend

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 55.9%
  • JavaScript 34.3%
  • HTML 7.5%
  • CSS 2.3%