Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/albugowy15/basketfood-api
A public REST-API for food order system built with Gin, Gorm, and PostgreSQL
https://github.com/albugowy15/basketfood-api
gin-gonic golang gorm postgresql rest-api
Last synced: 27 days ago
JSON representation
A public REST-API for food order system built with Gin, Gorm, and PostgreSQL
- Host: GitHub
- URL: https://github.com/albugowy15/basketfood-api
- Owner: albugowy15
- Created: 2023-01-08T11:48:27.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-11-30T03:48:37.000Z (11 months ago)
- Last Synced: 2024-09-28T18:20:55.811Z (about 1 month ago)
- Topics: gin-gonic, golang, gorm, postgresql, rest-api
- Language: Go
- Homepage:
- Size: 9.85 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# basketfood-api
A public API build with GORM and Gin Web Framework
## PDM
![BasketFood-2023-01-08_17-46](https://user-images.githubusercontent.com/49820990/214455894-72c8fabc-3e2f-4973-9849-762923c9799f.png)## How to run this project
### 1. Clone this project
```sh
git clone https://github.com/albugowy15/basketfood-api.git
```
### 2. Use your own database
This API using PostgreSQL database. You can create your own database on your local machine, then save all its credential to .env folder.Create `.env` file inside root directory, fill this variable with your own database credentials
```.env
DB_HOST=
DB_PASSWORD=
DB_USER=
DB_NAME=
DB_PORT=
```
### 3. Install all dependencies
Install all dependencies or library used in this project with command
```sh
go get -u -v ./...
```
### 4. Run the project
Run this project with command
```sh
go run main.go
```
You can see that your project is running at `http://localhost:8080`