Skip to content

Latest commit

 

History

History
96 lines (76 loc) · 2.43 KB

DIY.md

File metadata and controls

96 lines (76 loc) · 2.43 KB

APIpsum

Go Version Fiber Version

Table of Contents

Introduction

APIpsum is a RESTful API that generates JSON objects based on a provided schema. The API offers two primary endpoints: a GET request to verify availability and a POST request to generate data. It is built with Fiber, a fast, lightweight web framework written in Go.

Requirements

  • Go >= 1.16
  • Node.js >= 14.x
  • NPM >= 6.x (or Yarn/PNPM)
  • TailwindCSS >= 3.x
  • PostCSS >= 8.x

Installation

Clone this repository

git clone https://github.com/aabboudi/apipsum.git
cd apipsum

Install Go dependencies

go mod tidy

Install Node.js dependencies

cd ./static/
npm install
cd ..

Run PostCSS

npm run watch:css

Run the Go Fiber application

go run main.go

File Structure

├── controllers/          # Business logic
│   └── controllers.go
├── docs/                 # Swagger API documentation
│   ├── doc.go
│   ├── docs.json
│   └── docs.yaml
├── middleware/           # Logging and validation mechanisms
│   ├── logger.go
│   └── validator.go
├── routes/               # API route definitions
│   └── routes.go
├── static/               # Static files
│   ├── css/
│   │   └── input.css
│   ├── package.json
│   ├── postcss.config.js
│   └── tailwind.config.js
├── utils/                # Utility functions and packages
│   ├── utils.go
│   └── letters/
│       └── letters.go
├── views/                # HTML templates
│   └── index.html
├── .air.toml             # Air live-reload configuration
├── .gitignore            # Git ignore file
├── DIY.md                # This file
├── go.mod                # Go module definition
├── go.sum                # Go module dependencies
└── main.go               # Application entry point