Skip to content

Commit

Permalink
docusaurus preparations for the recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
ReneWerner87 committed Nov 26, 2024
1 parent d7e8036 commit 4b7ff41
Show file tree
Hide file tree
Showing 57 changed files with 1,021 additions and 388 deletions.
5 changes: 5 additions & 0 deletions docs/recipes/404-handler/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: 404 Handler
keywords: [404, not found, handler, errorhandler, custom]
---

# Custom 404 Not Found Handler Example

This example demonstrates how to implement a custom 404 Not Found handler using the [Fiber](https://gofiber.io) web framework in Go. The purpose of this example is to show how to handle requests to undefined routes gracefully by returning a 404 status code.
Expand Down
103 changes: 59 additions & 44 deletions docs/recipes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,72 +12,87 @@ Here you can find the most **delicious** recipes to cook delicious meals using o

## 🌽 Table of contents

- [Amazon Web Services (AWS) Elastic Beanstalk](./aws-eb)
<!-- AUTO-GENERATED-CONTENT:START -->
- [404 Handler](./404-handler)
- [Air Live Reloading](./air)
- [Auth + Docker + Postgres + JWT](./auth-docker-postgres-jwt)
- [Auth + JWT](./auth-jwt)
- [Autocert](./autocert)
- [AWS Elastic Beanstalk](./aws-eb)
- [AWS SAM](./aws-sam)
- [Certificates from Let's Encrypt](./autocert)
- [AWS SAM Container](./aws-sam-container)
- [Bootstrap](./bootstrap)
- [Clean Architecture](./clean-architecture)
- [Cloud Run](./cloud-run)
- [Colly Scraping using Fiber and PostgreSQL](./fiber-colly-gorm)
- [CSRF-with-Session](./csrf-with-session)
- [Colly Gorm](./colly-gorm)
- [CSRF](./csrf)
- [Custom 404 Not Found](./404-handler)
- [Dependency Injection (with Parsley)](./parsley)
- [Docker MariaDB Clean Architecture](./docker-mariadb-clean-arch)
- [Docker Nginx Loadbalancer](./docker-nginx-loadbalancer)
- [Docker Postgres-JWT](./auth-docker-postgres-jwt)
- [DummyJson](./dummyjson/)
- [Enable HTTPS/TLS using PKCS12 store](./https-pkcs12-tls)
- [Enable HTTPS/TLS](./https-tls)
- [Enable Preforking](./prefork)
- [Ent Mysql Example](./ent-mysql)
- [CSRF + Session](./csrf-with-session)
- [Docker + MariaDB](./docker-mariadb-clean-arch)
- [Docker + Nginx](./docker-nginx-loadbalancer)
- [Dummy JSON Proxy](./dummyjson)
- [Entgo ORM (MySQL)](./ent-mysql)
- [Entgo Sveltekit](./entgo-sveltekit)
- [Envoy External Authorization](./envoy-extauthz)
- [File Server](./file-server)
- [Firebase Authentication](./firebase-auth)
- [Firebase Functions](./firebase-functions)
- [GeoIP (with MaxMind databases)](./geoip-maxmind)
- [Firebase GCloud](./gcloud)
- [Google Cloud Firebase](./gcloud-firebase)
- [GeoIP](./geoip)
- [GORM Mysql Example](./gorm-mysql)
- [GeoIP + MaxMind](./geoip-maxmind)
- [GORM](./gorm)
- [GORM MySQL](./gorm-mysql)
- [GORM + PostgreSQL](./gorm-postgres)
- [Graceful shutdown](./graceful-shutdown)
- [GraphQL](./graphql)
- [Hello, World!](./hello-world)
- [Heroku App](./heroku)
- [gRPC](./grpc)
- [Hello World](./hello-world)
- [Heroku](./heroku)
- [Hexagonal Architecture](./hexagonal)
- [i18n](./i18n)
- [HTTPS with PKCS12 TLS](./https-pkcs12-tls)
- [HTTPS with TLS](./https-tls)
- [I18n](./i18n)
- [JWT](./jwt)
- [Kubernetes](./k8s)
- [Listen on Multiple Ports](./multiple-ports)
- [Live Reloading (Air)](./air)
- [Memgraph](./memgraph)
- [MinIO](./minio)
- [MongoDB](./mongodb)
- [MVC Application Bootstrap](./fiber-bootstrap)
- [Netlify Functions](fiber-svelte-netlify)
- [OAuth2 Google](./oauth2-google)
- [PostgreSQL](./postgresql)
- [RabbitMQ](rabbitmq)
- [React Router](./react-router)
- [Recover from panic](./recover)
- [RSS feed](./rss-feed)
- [Serve Static Files](./file-server)
- [MongoDB Example](./mongodb)
- [Multiple Ports](./multiple-ports)
- [MySQL](./mysql)
- [Neo4j](./neo4j)
- [OAuth2](./oauth2)
- [Google OAuth2](./oauth2-google)
- [Optional Parameter Example](./optional-parameter)
- [Parsley](./parsley)
- [PostgreSQL Example](./postgresql)
- [Prefork Example](./prefork)
- [RabbitMQ](./rabbitmq)
- [React](./react-router)
- [Recover Middleware Example](./recover)
- [RSS Feed](./rss-feed)
- [Server Timing](./server-timing)
- [Server-Sent Events](./sse)
- [Sessions-SQLite3](./sessions-sqlite3)
- [Single Page Application Example](./spa)
- [Socket.io](./socketio)
- [Sessions + SQLite3](./sessions-sqlite3)
- [Socketio](./socketio)
- [Single Page Application (SPA)](./spa)
- [Sqlboiler](./sqlboiler)
- [Sqlc](./sqlc)
- [Streaming of the Request Body](./stream-request-body)
- [Server-Sent Events](./sse)
- [Stream Request Body](./stream-request-body)
- [Svelte Netlify](./svelte-netlify)
- [Sveltekit Embed](./sveltekit-embed)
- [Tableflip (Graceful updates)](./tableflip)
- [Swagger](./swagger)
- [Tableflip Example](./tableflip)
- [Template](./template)
- [Template Asset Bundling](./template-asset-bundling)
- [Unit Test Example](./unit-test)
- [Upload Multiple Files](./upload-file/multiple)
- [Upload Single File](./upload-file/single)
- [URL shortener API](./url-shortener-api)
- [User Auth with JWT](./auth-jwt)
- [Todo App + Auth + GORM](./todo-app-with-auth-gorm)
- [Unit Testing](./unit-test)
- [File Upload](./upload-file)
- [URL Shortener](./url-shortener-api)
- [Validation](./validation)
- [Vercel](./vercel)
- [WebSocket Chat Example](./websocket-chat)
- [WebSockets](./websocket)
- [WebSocket](./websocket)
- [WebSocket Chat](./websocket-chat)
<!-- AUTO-GENERATED-CONTENT:END -->

## 👩‍🍳 Have a delicious recipe?

Expand Down
5 changes: 5 additions & 0 deletions docs/recipes/air/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Air Live Reloading
keywords: [air, live reloading, development, air tool, hot reload, watch, changes]
---

# Live Reloading with Air Example

This example demonstrates how to set up live reloading for a Go application using the [Air](https://github.com/cosmtrek/air) tool. The purpose of this example is to show how to automatically reload your application during development whenever you make changes to the source code.
Expand Down
5 changes: 5 additions & 0 deletions docs/recipes/auth-docker-postgres-jwt/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Auth + Docker + Postgres + JWT
keywords: [auth, docker, postgres, jwt]
---

# Auth Docker Postgres JWT Example

This example demonstrates a boilerplate setup for a Go Fiber application that uses Docker, PostgreSQL, and JWT for authentication.
Expand Down
5 changes: 5 additions & 0 deletions docs/recipes/auth-jwt/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Auth + JWT
keywords: [auth, jwt, gorm, fiber]
---

# Auth JWT Example

This example demonstrates a boilerplate setup for a Go Fiber application that uses JWT for authentication.
Expand Down
5 changes: 5 additions & 0 deletions docs/recipes/autocert/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Autocert
keywords: [autocert, tls, letsencrypt, ssl, https]
---

# Autocert Example

This example demonstrates how to set up a secure Go Fiber application using Let's Encrypt for automatic TLS certificate management with `autocert`.
Expand Down
5 changes: 5 additions & 0 deletions docs/recipes/aws-eb/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: AWS Elastic Beanstalk
keywords: [aws, elastic beanstalk, deploy, amazon, aws-eb]
---

# AWS Elastic Beanstalk Example

This example demonstrates how to deploy a Go Fiber application to AWS Elastic Beanstalk.
Expand Down
15 changes: 10 additions & 5 deletions docs/recipes/aws-sam-container/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# app
---
title: AWS SAM Container
keywords: [aws, sam, serverless, lambda, container]
---

# AWS SAM Container

This is a sample template for app - Below is a brief explanation of what we have generated for you:

Expand Down Expand Up @@ -28,10 +33,10 @@ You may need the following for local testing.

## Setup process

### Installing dependencies & building the target
### Installing dependencies & building the target

In this example we use the built-in `sam build` to build a docker image from a Dockerfile and then copy the source of your application inside the Docker image.
Read more about [SAM Build here](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-cli-command-reference-sam-build.html)
In this example we use the built-in `sam build` to build a docker image from a Dockerfile and then copy the source of your application inside the Docker image.
Read more about [SAM Build here](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-cli-command-reference-sam-build.html)

### Local development

Expand Down Expand Up @@ -120,4 +125,4 @@ If it's already installed, run the following command to ensure it's the latest v

```shell
choco upgrade golang
```
```
7 changes: 6 additions & 1 deletion docs/recipes/aws-sam/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# sam-app
---
title: AWS SAM
keywords: [aws, sam, serverless, lambda]
---

# AWS SAM

This is a sample template for sam-app - Below is a brief explanation of what we have generated for you:

Expand Down
5 changes: 5 additions & 0 deletions docs/recipes/clean-architecture/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Clean Architecture
keywords: [clean, architecture, fiber, mongodb, go]
---

# Clean Architecture Example

This example demonstrates a Go Fiber application following the principles of Clean Architecture.
Expand Down
5 changes: 5 additions & 0 deletions docs/recipes/cloud-run/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Cloud Run
keywords: [cloud run, deploy, google, docker, gcp]
---

# Cloud Run Example

This example demonstrates how to deploy a Go Fiber application to Google Cloud Run.
Expand Down
7 changes: 6 additions & 1 deletion docs/recipes/csrf-with-session/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: CSRF + Session
keywords: [csrf, security, hacking, vulnerability, session]
---

# CSRF-with-session Example

Example GoFiber web app using Cross Site Request Forgery (CSRF) middleware with session.
Expand Down Expand Up @@ -107,7 +112,7 @@ Sessions are stored in memory for this example, but you can use any session stor

### Note on pre-sessions

GoFiber's CSRF middleware will automatically create a session if one does not exist. That means that we always have pre-sessions when using the CSRF middleware. In this example we set a session variable `loggedIn`
GoFiber's CSRF middleware will automatically create a session if one does not exist. That means that we always have pre-sessions when using the CSRF middleware. In this example we set a session variable `loggedIn`
to `true` when the user logs in, in order to distinguish between logged in and logged out users.


Expand Down
5 changes: 5 additions & 0 deletions docs/recipes/csrf/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: CSRF
keywords: [csrf, security, hacking, vulnerability]
---

# CSRF Examples

Example Cross Site Request Forgery (CSRF) vulnerabilities in action.
Expand Down
5 changes: 5 additions & 0 deletions docs/recipes/docker-mariadb-clean-arch/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Docker + MariaDB
keywords: [docker, mariadb, clean architecture, makefile]
---

# Docker MariaDB Clean Architecture

A slightly complex REST application with Fiber to showcase Clean Architecture with MariaDB as a dependency with Docker.
Expand Down
13 changes: 5 additions & 8 deletions docs/recipes/docker-nginx-loadbalancer/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
# Docker+Nginx 🚀

<a href="https://gofiber.io">
<picture>
<source height="125" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/gofiber/docs/master/static/img/logo-dark.svg" />
<img height="125" alt="Fiber" src="https://raw.githubusercontent.com/gofiber/docs/master/static/img/logo.svg" />
</picture>
</a>
---
title: Docker + Nginx
keywords: [docker, nginx, loadbalancer, reverse proxy]
---

# Docker + Nginx

## Features

Expand Down
9 changes: 7 additions & 2 deletions docs/recipes/dummyjson/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
## Simple Fiber Proxy Server
---
title: Dummy JSON Proxy
keywords: [dummyjson, proxy, json, server]
---

# Simple Fiber Proxy Server

This is a basic Go application using the Fiber framework to create a web server. The server listens on port 3000 and has a single route (`GET /`) that fetches data from an external URL (`https://dummyjson.com/products/1`) and forwards it to the client.

Expand All @@ -17,4 +22,4 @@ This is a basic Go application using the Fiber framework to create a web server.
### Error Handling

- Returns a 500 Internal Server Error if any issue occurs during the fetch.
- Returns the same status code as the external service if it's not a 200 OK.
- Returns the same status code as the external service if it's not a 200 OK.
11 changes: 8 additions & 3 deletions docs/recipes/ent-mysql/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
### Example ent ORM for fiber with MySQL
---
title: Entgo ORM (MySQL)
keywords: [ent, mysql, orm, rest]
---

# Example ent ORM for fiber with MySQL

A sample program how to connect ent ORM

### How to start (If no ent dir)
## How to start (If no ent dir)
Execute command first
```bash
go run -mod=mod entgo.io/ent/cmd/ent new Book
Expand All @@ -22,7 +27,7 @@ Execute command
go generate ./ent
```

#### Endpoints
### Endpoints

| Method | URL | Description |
|--------|-------------|-----------------|
Expand Down
5 changes: 5 additions & 0 deletions docs/recipes/entgo-sveltekit/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Entgo Sveltekit
keywords: [ent, sveltekit, tailwindcss, sqlite, rest]
---

# Todo Application
![image](https://github.com/ugurkorkmaz/gofiber-recipes/assets/40540244/08c6ee52-724a-4cf4-8352-9cf6f5b007ef)

Expand Down
31 changes: 0 additions & 31 deletions docs/recipes/fiber-bootstrap/README.md

This file was deleted.

Loading

0 comments on commit 4b7ff41

Please sign in to comment.