Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rogaha/go-postgres-jwt-react-challenge
https://github.com/rogaha/go-postgres-jwt-react-challenge
Last synced: 19 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/rogaha/go-postgres-jwt-react-challenge
- Owner: rogaha
- Created: 2020-07-02T21:07:03.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-05-05T02:46:08.000Z (over 1 year ago)
- Last Synced: 2024-11-06T09:11:57.681Z (2 months ago)
- Language: Go
- Size: 1.32 MB
- Stars: 0
- Watchers: 3
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GO-React starter
![](./assets/logo.png)This is a boilerplate/starter for a go and react project.
It uses the go gin framework.
## Getting started
### With Docker
- Install [Docker](https://docs.docker.com/get-docker/)
- Install [Docker Compose](https://docs.docker.com/compose/install/)
### Without Docker
- Download and install [golang](https://golang.org)
- Download and install [postgres](https://www.postgresql.org/download/)
- [Setup Postgres](https://www.codementor.io/engineerapart/getting-started-with-postgresql-on-mac-osx-are8jcopb): Setting up postgres on a mac- [Setup postgres- windows](https://www.robinwieruch.de/postgres-sql-windows-setup/): Setting up postgres on windows
## Usage
Clone this repository### With Docker
```
docker-compose up
```That's all :)
### Without Docker
Use the queries in the [server/db/.psql](./server/db/.postgres) file to setup the database.
Enter the DB creds in the [server/config/](./server/config/config.go) file
Navigate to the server directory
```bash
> cd server
> go run main.go
```This will start the go server.
To start the react app navigate to the client directory
```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
}
```
* /customers [POST] [GET]
```
....
```
* /paymentmethods [POST] [GET]
```
....
```## Routes
* /login* /register
* /session
* /paymentmethods
* /customers
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.## License
[MIT](https://choosealicense.com/licenses/mit/)