Tutorial: Deploying a basic Gin app on Jekyo

Tutorial: Deploying a basic Gin app on Jekyo

Demo app here

Prerequisites

Make sure you have NodeJS, npm and git installed.

If it's your first time using Jekyo, you can install it by running the following command in your terminal:

npm install -g jekyo

Sign in to Jekyo

You can sign in to Jekyo by running jekyo user:signin

➜  ~ jekyo user:signin 
Your email?: **************
Your password?: **********
You have successfully signed in!

If you don't have a Jekyo account, you can create one in the terminal by running jekyo user:signup.

1. Create a basic Gin app

You can start your Gin project by using jekyo create

Using the arrows on your keyboard, select gin-gonic and press enter.

? Select template
  None Creates only the application
  expressjs A basic app skeleton using [Express](https://expressjs.com/)     
  nuxt-js A boilerplate SSR application using [Nuxt.js](https://nuxtjs.org/) 
❯ gin-gonic A basic starter app using [Gin](https://gin-gonic.com/)

When prompted, enter the desired name for your Gin app.

Application name?: gin-gonic-tutorial

This will create a basic Gin app in the current directory by cloning this Gin starter app repository.

Cloning source code... OK
Application created!

Deploy the Gin app on Jekyo

To deploy the app, first navigate to the newly created directory:

cd gin-gonic-tutorial

Now you can deploy this app to Jekyo by running:

jekyo deploy

After a while, you should see something like this:

➜  Fetching source code ... OK
➜  Building application, this might take a while ... OK
➜  Publishing application, this might take a while  ... OK
➜  Deploying application ... OK        
➜  Waiting for application to start ... OK
➜  Visit your app on: https://gin-gonic-tutorial.jekyo.app ... OK

You can now browse to your Gin app on https://gin-gonic-tutorial.jekyo.app (replace 'gin-gonic-tutorial' with your app name)

2. Deploying an existing Gin app

Navigate to your local Gin app directory

cd my-gin-gonic

Initialize a git repository if you haven't already done so by running git init.

Create an empty Jekyo app:

jekyo create

Select none using the arrows on your keyboard and press enter. This will create an app using your current directory.

? Select template (Use arrow keys)
❯ None Creates an application from your current directory

Name your app:

Application name?: my-gin-gonic

Run jekyo link to link your local app to the remote Jekyo app. Select 'my-gin-gonic' using the arrows on your keyboard and press enter.

? Select application (Use arrow keys)
❯ my-gin-gonic

Now you can deploy this app to Jekyo by running:

jekyo deploy

After a while, you should see something like this:

➜  Fetching source code ... OK
➜  Building application, this might take a while ... OK
➜  Publishing application, this might take a while  ... OK
➜  Deploying application ... OK        
➜  Waiting for application to start ... OK
➜  Visit your app on: https://my-gin-gonic.jekyo.app ... OK

You can now browse to your Gin app on https://my-gin-gonic.jekyo.app (replace 'my-gin-gonic' with your app name)

Pushing local changes to Jekyo

Add the newly modified file(s) to the git index by using git add

git add filename

Create a git commit

git commit -m "your commit message"

Now, simply deploy your app again:

jekyo deploy

You will see your changes on your live app after a short while.

Similar Resources

Simple web app using Go and Gin framework

go-gin-app Simple web app using Go and Gin framework Golang 과 Gin 프레임워크를 사용한 간단한 웹 앱 How to get Started Install Gin and have Go installed on your syst

Oct 18, 2021

Go-get-gin - Simple golang app deployed on gcp

go-get-gin a simple golang gin app to be deployed on gcp Getting started make su

Jan 12, 2022

Backend to project Dating App. Written in GO, utilising Gin. MongoDB, AWS S3 and SNS.

Dating API Backend to project Dating App. Written in GO, utilising Gin. MongoDB, AWS S3 and SNS. In order to run simply type "go run ." The API requir

Apr 12, 2022

記帳-PWA-web-app (Bookkeeping-PWA-web-app)

記帳-PWA-web-app (Bookkeeping-PWA-web-app)

GoKeep (bookkeeping web app) 記帳-PWA-web-app (Bookkeeping-PWA-web-app) demo link : https://bookkepping.herokuapp.com/ 測試用帳密 : tester002 , tester002 (亦可

Jan 31, 2022

:construction: Closed. A website and user system (Gin/Backbone).

A website and user system starter. Implemented with gin and Backbone. Gowall is port of Drywall Go Node.js Repository here Drywall Site Gowall Drywall

Jul 6, 2020

GoCondor is a golang web framework with an MVC like architecture, it's based on Gin framework

GoCondor is a golang web framework with an MVC like architecture, it's based on Gin framework

GoCondor is a golang web framework with an MVC like architecture, it's based on Gin framework, it features a simple organized directory structure for your next project with a pleasant development experience, made for developing modern APIs and microservices.

Dec 29, 2022

gin api blog

Gin项目 介绍 以下是基于gin开发的项目接口,将持续更新,有兴趣请star,本项目包含mysql,redis,elasticsearch,mongo,rabbitmq,kafka,jaeger,单机限流,分布式限流,sentry, jwt,请求参数验证,发送邮件,图片上传,httpclient用

Oct 14, 2022

gin api的脚手架

基于gin的api脚手架 0、支持指定配置文件启动 1、不破坏gin的原有特性,基本不影响原有gin的运行速度 2、wire负责管理依赖注入 3、集成常用组件gorm/zap/viper/go-redis等 4、方便集成第三放组件 5、可扩展解耦方便,只需要替换data层数据源即可(biz负责定义r

Aug 12, 2022

前端使用Vue3、CompositionAPI、typescript、vite、element plus,后端使用Go + Gin + Gorm,实现的后端管理系统,支持菜单、页面按钮及后端API的权限管控。

前端使用Vue3、CompositionAPI、typescript、vite、element plus,后端使用Go + Gin + Gorm,实现的后端管理系统,支持菜单、页面按钮及后端API的权限管控。

本系统使用最新的 Vue3 及相关技术栈,实现了菜单及页面按钮的权限管控,基于 Casbin 实现了后端 API 接口的管控,不进行过度的封装,代码简洁易懂,方便二次开发及当成后端管理平台脚手架使用,数据库暂时仅支持 postgres 。 演示站点:http://fdevops.com:8088 文

Apr 1, 2022
Gin-boilerplate - Gin boilerplate preconfigured with basic rest api features

Gin Boilerplate Build apis with gin faster with this template Features Validatio

Jun 24, 2022
Example golang using gin framework everything you need, i create this tutorial special for beginner.

Golang Gin Framework Fundamental Example golang using gin framework everything you need, i create this tutorial special for beginner. Feature Containe

Dec 16, 2022
Tutorial: Developing a RESTful API with Go and Gin

Tutorial: Developing a RESTful API with Go and Gin https://go.dev/doc/tutorial/w

Jan 17, 2022
Go (Golang) API REST with Gin FrameworkGo (Golang) API REST with Gin Framework

go-rest-api-aml-service Go (Golang) API REST with Gin Framework 1. Project Description Build REST APIs to support AML service with the support of exte

Nov 21, 2021
Gin-boilerplate - This repository contains boilerplate code of a REST service using Gin (golang) framework.

Boilerplate REST service using Gin web framework (golang) Introduction This repository contains a boilerplate REST API service using Gin web framework

Apr 28, 2022
Gin-easy-todo - golang 의 RESTful API 프레임워크 gin 을 활용해 아주 간단한 Todo 애플리케이션을 만들어보자.
Gin-easy-todo - golang 의 RESTful API 프레임워크 gin 을 활용해 아주 간단한 Todo 애플리케이션을 만들어보자.

목차 1. 요약 2. 목표 3. API 목록 4. 프로젝트 구조 5. 패키지 별 기능과 관계 6. 사전 작업 6.1. DB, Table 생성 6.2. 모듈 생성 6.3. 패키지 다운로드 7. Gin 작성 7.1. 데이터베이스 설정 7.2. 테이블, 스키마 정의 7.3.

Jan 2, 2022
Go-service-gin - Simple Web api application developed in Golang and Gin

Simple Web api application developed in Golang and Gin Initial Tutorial URL http

Jan 4, 2022
Go-gin-ddd-cqrs - Clean api rest with Go, Gin and GORM
Go-gin-ddd-cqrs - Clean api rest with Go, Gin and GORM

GOLANG API REST Clean api rest with Go, Gin and GORM. Clean Architecture with DD

Oct 21, 2022
Go-gin-mongo-api - A backend RESTful API built using golang, gin and mongoDB

go-gin-mongo-API This is a RESTful backend API which is developed using the gola

Jul 19, 2022
A barebones URL Shortener implementation in Go using Gin and MySQL. Also features a basic frontend.

URL Shortener in Go This is a barebones URL Shortener implementation in Go using the Gin web framework and MySQL. Also features a basic frontend. Loca

Dec 22, 2021