GithubHelp home page GithubHelp logo

soelz4 / book-management-system-sql-crud-api Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 8.22 MB

Book Management System ๐Ÿ“š (CRUD API) with DataBase (PostgreSQL) ๐Ÿ˜

Makefile 26.78% Dockerfile 3.71% Go 69.51%

book-management-system-sql-crud-api's Introduction

book-management-system-sql-crud-api

โš ๏ธ NOTE!!!!! This Goalng App Written for Me - So some Things Might not Work on Your PC or Laptop as this was Never Intended to be a Usable Full Fledged Application, in that Case, Please Try if You Can Fix that Up as Much as Possible, or you can Open an Issue for Help :) - You Need to Change Something Related to Database (in Makefile, docker-compose.yml, gorm and ...) - So Please Check Everything Before Running the Database and Server.

Requirements

Makefile

A Standard GNU Make File is Provided to Help with Running and Building Locally.

help                 ๐Ÿ’ฌ This Help Message
lint                 ๐Ÿ”Ž Lint & Format, will not Fix but Sets Exit Code on Error
lint-fix             ๐Ÿ“œ Lint & Format, will Try to Fix Errors and Modify Code
build                ๐Ÿ”จ Build Binary File
run                  ๐Ÿƒ Run the Web Server Locally at PORT 9010
init                 ๐Ÿ“ฅ Download Dependencies From go.mod File
clean                ๐Ÿงน Clean up Project
postgres             ๐Ÿ“š Pull PostgreSQL Docker Image from Docker Hub Registry
docker-network       ๐Ÿชก Create Docker Network
image                ๐Ÿ“ฆ Build Docker Container Image from Dockerfile
push                 ๐Ÿ“ค Push Container Image to Registry
compose-up           ๐Ÿงท Create and Start Containers
compose-down         ๐Ÿงผ Stop and Remove Containers, Networks

Makefile Variables

Makefile Variable Default
SRC_DIR ./src/
DEFAULT_GOAL help
BINARY_NAME main
BINARY_DIR ./bin/
IMAGE_REPO soelz/golang-book-management-system-sql-crud-api
IMAGE_TAG 0.1
DATABASE_URL postgres://gorm:1234@db:5432/bank
PostgreSQL_IMAGE postgres:alpine3.18

DataBase (PostgreSQL)

PostgreSQL ORM Configurations (GORM) Available in ./src/pkg/config/app.go.

Containers

RUN Server in a Container

docker run --name db --network backend -e POSTGRES_USER=gorm -e POSTGRES_PASSWORD=1234 -e POSTGRES_DB=bank -p 5432:5432 postgres:alpine3.18
docker run --network backend -e DATABASE_URL=postgres://gorm:1234@db:5432/bank -p 9010:9010 soelz/golang-book-management-system-sql-crud-api:0.1

OR

Just Execute this Command ~>

make compose-up


cat

book-management-system-sql-crud-api's People

Contributors

soelz4 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.