https://github.com/zeroidentidad/go-postgres-jwt-react
JWT authentication in React client with Go server
https://github.com/zeroidentidad/go-postgres-jwt-react
Last synced: about 2 months ago
JSON representation
JWT authentication in React client with Go server
- Host: GitHub
- URL: https://github.com/zeroidentidad/go-postgres-jwt-react
- Owner: zeroidentidad
- Created: 2020-08-09T03:43:17.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-09T03:56:05.000Z (almost 5 years ago)
- Last Synced: 2025-01-30T11:11:13.280Z (4 months ago)
- Language: JavaScript
- Size: 209 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Go-React template
Este es un ejemplo boilerplate/starter para un proyecto en Golang (con postgres) y React.
*Se utiliza gin framework en go.
## Uso
Clonar o descargar este repositorio
Utilizar scripts en el archivo [server/db/.psql](./server/db/.psql) para configurar la base de datos.
Ingresar las credenciales de conexion a DB en el archivo [server/config/config.go](./server/config/config.go)
Navegar al directorio **server** ya teniendo las configuraciones previas.
```bash
> cd server
> go run .
```Esto iniciará el servidor Go.
Para iniciar la aplicación React, navegar hasta el directorio **client**
```bash
> cd client
> yarn install
> yarn start
```
### EndPoints* /session [GET]
* /register [POST]
```js
{
name String,
email String,
password String
}
```* /login [POST]
```js
{
email String,
password String
}
```* /createReset [POST]
```js
{
email String
}
```* /resetPassword [POST]
```js
{
id Int,
password String,
confirm_password String
}
```## Rutas
* /login
* /register
* /session
* /createReset
* /resetPassword
## Contribuir
Pull requests son bienvenidas. Para cambios importantes, primero abrir un issue para discutir qué le gustaría cambiar.