Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

✨ A complete and self-contained solution for developers of any qualification to create a production-ready project with backend (Go), frontend (JavaScript, TypeScript) and deploy automation (Ansible, Docker) by running only one CLI command.

License

NotificationsYou must be signed in to change notification settings

create-go-app/cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Create Go App

Create Go App CLI

Go versionGo reportCode coverage
WikiLicense

Create a new production-ready project withbackend (Golang),frontend (JavaScript, TypeScript) anddeploy automation (Ansible, Docker) by running only one command. Focus onwriting your code andthinking of the business-logic! The CLI will take care of the rest.

⚡️ Quick start

First,download and installGo. Version1.21 orhigher is required.

👆 You can also useCreate Go App CLI via other Goversions:1.16,1.17.

Installation is done by using thego install command:

go install github.com/create-go-app/cli/v4/cmd/cgapp@latest

Or see the repository'sRelease page, if you want todownload a ready-madedeb,rpm,apk orArch Linux package.

Also, GNU/Linux and macOS users available way to install viaHomebrew:

# Tap a new formula:brew tap create-go-app/tap# Installation:brew install create-go-app/tap/cgapp

Let's create a new project viainteractive console UI (orCUI forshort) in current folder:

cgapp create

Next, open the generated Ansible inventory file (calledhosts.ini) andfill in the variables according to your server configuration. And you'reready toautomatically deploy this project:

cgapp deploy

That's all you need to know to start! 🎉

🐳 Docker-way to quick start

If you don't want to install Create Go App CLI to your system, you feel freeto using our officialDocker image and run CLI from isolatedcontainer:

docker run --rm -it -v${PWD}:${PWD} -w${PWD} koddr/cgapp:latest [COMMAND]

🔔 Please note: thedeploy command is currentlyunavailable in thisimage.

📖 Project Wiki

The best way to better explore all the features of theCreate Go App CLIis to read the projectWiki and take part inDiscussions and/orIssues.

Yes, the most frequently asked questions (FAQ) are alsohere.

⚙️ Commands & Options

create

CLI command for create a new project with the interactive console UI.

cgapp create [OPTION]
OptionDescriptionTypeDefaultRequired?
-tEnables to define custom backend and frontend templates.boolfalseNo

cgapp_create

deploy

CLI command for deploy Docker containers with your project via Ansible tothe remote server.

🔔 Make sure that you havePython 3.8+ andAnsible 2.9+ installed on your computer.

cgapp deploy [OPTION]
OptionDescriptionTypeDefaultRequired?
-kPrompt you to provide the remote user sudo password (a standard Ansible--ask-become-pass option).boolfalseNo

cgapp_deploy

📝 Production-ready project templates

Backend

  • Backend template with Golang built-innet/http package:
    • net/http — simple REST API with CRUDand JWT auth.
  • Backend template withFiber:
    • fiber — complex REST API with CRUD, JWT authwith renew token, DB and cache.
  • Backend template withgo-chi:
    • chi — a basic application with health check.

Frontend

Frontend part will be generated using awesome toolVite.jsunder the hood.

So, you'll always get the latest version of React, Preact, Vue, Svelte,Solid, Lit, Qwik, or pure JavaScript/TypeScript templates for your project.

NameDescriptionJavaScriptTypescript
PureA pure JavaScript/Typescript appvanillavanilla-ts
ReactA common React appreactreact-ts
React (with SWC)A React app with SWCreact-swcreact-swc-ts
PreactA common Preact apppreactpreact-ts
Vue.jsA common Vue.js appvuevue-ts
SvelteA common Svelte appsveltesvelte-ts
SolidA common Solid appsolidsolid-ts
LitA common Lit applitlit-ts
QwikA common Qwik appqwikqwik-ts

TheNext.js andNuxt frontend parts will be generated using the latestcreate-next-app andnuxi utilities.

NameDescriptionJavaScriptTypescript
Next.jsA common Next.js appnextnext-ts
NuxtA common Nuxt v3 app-nuxt
SveltekitA common Sveltekit app-sveltekit

❗️ Please make sure that you havenpm version7 or higher installed tocreate the frontend part of the project correctly. If you run thecgapp -create command using ourDocker image,npm of thecorrect version isalready included.

🚚 Pre-configured Ansible roles

Web/Proxy server

  • Roles for run Docker container withTraefik Proxy:
    • traefik — configured Traefik container with a simple ACME challengevia CA server.
    • traefik-acme-dns — configured Traefik container with a complex ACMEchallenge via DNS provider.
  • Roles for run Docker container withNginx:
    • nginx — pure Nginx container with "the best practice" configuration.

✌️ Since Create Go App CLIv2.0.0, we're recommended to useTraefikProxy as default proxy server for your projects. The main reason: thisproxy providesautomatic SSL certificates from Let's Encrypt out of thebox. Also, Traefik was built on the Docker ecosystem and has areallygood-looking anduseful Web UI.

Database

  • Roles for run Docker container withPostgreSQL:
    • postgres — configured PostgreSQL container with apply migrations forbackend.

Cache (key-value storage)

  • Roles for run Docker container withRedis:
    • redis — configured Redis container for backend.

⭐️ Project assistance

If you want to saythank you or/and support active development ofCreate Go App CLI:

❗️ Support the author

You can support the author onBoosty, both on apermanent and on aone-time basis.

All proceeds from this way will go tosupport my OSS projects and will energize me tocreate new products and articles for the community.

support me on Boosty

🏆 A win-win cooperation

And now, I invite you to participate in this project! Let's worktogether tocreate themost useful tool for developers on the web today.

  • Issues: ask questions and submit your features.
  • Pull requests: send your improvements to the current.

Together, we can make this projectbetter every day! 😘

🔥 Other projects from the author

gowebly project

⚠️ License

Create Go App CLI is free and open-source software licensed undertheApache 2.0 License. Officiallogo wascreated byVic Shóstak and distributed underCreative Commons license (CC BY-SA 4.0 International).

About

✨ A complete and self-contained solution for developers of any qualification to create a production-ready project with backend (Go), frontend (JavaScript, TypeScript) and deploy automation (Ansible, Docker) by running only one CLI command.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors13


[8]ページ先頭

©2009-2025 Movatter.jp