Code Monkey home page Code Monkey logo

create-go-app / cli Goto Github PK

View Code? Open in Web Editor NEW
2.3K 30.0 244.0 7.9 MB

✨ 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.

Home Page: https://github.com/create-go-app/cli/wiki

License: Apache License 2.0

Go 80.20% Dockerfile 0.11% Makefile 4.82% Jinja 14.86%
cli cli-app cli-commands golang go create-go-app cgapp frontend backend docker-container

cli's Introduction

Create Go App

Create Go App CLI

Go version Go report Code coverage Wiki License

Create a new production-ready project with backend (Golang), frontend (JavaScript, TypeScript) and deploy automation (Ansible, Docker) by running only one CLI command.

Focus on writing your code and thinking of the business-logic! The CLI will take care of the rest.

⚡️ Quick start

First, download and install Go. Version 1.20 or higher is required.

❗️ Note: If you're looking for the Create Go App CLI for other Go versions: 1.16, 1.17.

Installation is done by using the go install command:

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

Or see the repository's Release page, if you want to download a ready-made deb, rpm, apk or Arch Linux package.

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

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

# Installation:
brew install create-go-app/tap/cgapp

Let's create a new project via interactive console UI (or CUI for short) in current folder:

cgapp create

Next, open the generated Ansible inventory file (called hosts.ini) and fill in the variables according to your server configuration. And you're ready to automatically 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 free to using our official Docker image and run CLI from isolated container:

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

🔔 Please note: the deploy command is currently unavailable in this image.

📖 Project Wiki

The best way to better explore all the features of the Create Go App CLI is to read the project Wiki and take part in Discussions and/or Issues.

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

⚙️ Commands & Options

create

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

cgapp create [OPTION]
Option Description Type Default Required?
-t Enables to define custom backend and frontend templates. bool false No

cgapp_create

deploy

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

🔔 Make sure that you have Python 3.8+ and Ansible 2.9+ installed on your computer.

cgapp deploy [OPTION]
Option Description Type Default Required?
-k Prompt you to provide the remote user sudo password (a standard Ansible --ask-become-pass option). bool false No

cgapp_deploy

📝 Production-ready project templates

Backend

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

Frontend

Frontend part will be generated using awesome tool Vite.js under 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.

Name Description JavaScript Typescript
Pure A pure JavaScript/Typescript app vanilla vanilla-ts
React A common React app react react-ts
React (with SWC) A React app with SWC react-swc react-swc-ts
Preact A common Preact app preact preact-ts
Vue.js A common Vue.js app vue vue-ts
Svelte A common Svelte app svelte svelte-ts
Solid A common Solid app solid solid-ts
Lit A common Lit app lit lit-ts
Qwik A common Qwik app qwik qwik-ts

The Next.js and Nuxt frontend parts will be generated using the latest create-next-app and nuxi utilities.

Name Description JavaScript Typescript
Next.js A common Next.js app next next-ts
Nuxt A common Nuxt v3 app - nuxt

❗️ Please make sure that you have npm version 7 or higher installed to create the frontend part of the project correctly. If you run the cgapp -create command using our Docker image, npm of the correct version is already included.

🚚 Pre-configured Ansible roles

Web/Proxy server

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

✌️ Since Create Go App CLI v2.0.0, we're recommended to use Traefik Proxy as default proxy server for your projects. The main reason: this proxy provides automatic SSL certificates from Let's Encrypt out of the box. Also, Traefik was built on the Docker ecosystem and has a really good-looking and useful Web UI.

Database

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

Cache (key-value storage)

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

⭐️ Project assistance

If you want to say thank you or/and support active development of Create Go App CLI:

  • Add a GitHub Star to the project.
  • Tweet about project on your Twitter for all of your friends and colleagues.
  • Write interesting articles about project on Dev.to, or personal blog.
  • Join DigitalOcean at our referral link (your profit is $100 and we get $25).
  • Leave a review on our ProductHunt page.

Product Hunt

🏆 A win-win cooperation

And now, I invite you to participate in this project! Let's work together to create the most 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 project better every day! 😘

🔥 Other projects of the authors

gowebly logo

⚠️ License

Create Go App CLI is free and open-source software licensed under the Apache 2.0 License. Official logo was created by Vic Shóstak and distributed under Creative Commons license (CC BY-SA 4.0 International).

cli's People

Contributors

akiffeyzioglu avatar dasuken avatar dependabot-preview[bot] avatar dependabot[bot] avatar iamsahebgiri avatar j-fuentes avatar koddr avatar mattn avatar mystique09 avatar pierorolando1 avatar vanodevium avatar zhouyusd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cli's Issues

Does not work on Apple M1 computer

Required check list:

  • I'm gonna mark the checkboxes like this.
  • I didn't find in the Create Go App CLI repository's issues section similar bug.
  • I understand, that the Create Go App CLI is Open Source and not-for-profit product.
  • This is not about third-party project, framework, package or technology.

My environment:

  • OS Ventura 13.2.1 (22D68):
  • Golang (go version go1.20.2 darwin/arm64):
  • Create Go App CLI (cgapp -v):

Describe the bug:

Steps to reproduce the behavior:

  1. Go to Terminal
  2. Click on type cgapp create
  3. I get [1] 9955 killed cgapp create

Expected behavior:

I expect to see the process for creating the app.

Screenshots:
Screenshot 2023-03-14 at 9 50 31

Additional context:

No `Frontend` folder gets created when `react-ts` is selected as frontend framework/library

Required check list:

  • I'm gonna mark the checkboxes like this.
  • I didn't find in the Create Go App CLI repository's issues section similar bug.
  • I understand, that the Create Go App CLI is Open Source and not-for-profit product.
  • This is not about third-party project, framework, package or technology.

My environment:

  • OS : Linux windows 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
  • Golang (go version): go version go1.18.3 linux/amd64
  • Create Go App CLI (cgapp -v): cgapp version 3.6.2

Describe the bug:

If you follow the steps below, there is no frontend folder that gets generated for the react-ts framework/library

Steps to reproduce the behavior:

  1. mkdir GO-PROJECT
  2. cd GO-PROJECT
  3. cgapp create
  4. Select fiber as backend framework
  5. Select react-ts as frontend framework/library
  6. Select traefik-acme-dns as web/proxy server
  7. Click enter to create project
  8. No frontend folder is created

Expected behavior:

The project bootstraps properly including the frontend directory

Screenshots:

Image when running the commands
image

Image of directory structure after commands, notice frontend is missing:
image

Dependabot can't resolve your Go dependency files

Dependabot can't resolve your Go dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

github.com/create-go-app/cli/cmd: cannot find module providing package github.com/create-go-app/cli/cmd

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Error when creating a new app using the Docker image

Required check list:

  • I'm gonna mark the checkboxes like this.
  • I didn't find in the Create Go App CLI repository's issues section similar bug.
  • I understand, that the Create Go App CLI is Open Source and not-for-profit product.
  • This is not about third-party project, framework, package or technology.

My environment:

  • OS (uname -a): Linux 5.14.0-1048-oem #55-Ubuntu SMP Mon Aug 8 14:58:10 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
  • Golang (go version): go version go1.18.5 linux/amd64
  • Create Go App CLI (cgapp -v): cgapp version 3.6.2
  • Docker version: 20.10.17

Describe the bug:

  1. Go into an empty folder
  2. Run the generator app with Docker:
docker run --rm -it -v ${PWD}:${PWD} -w ${PWD} koddr/cgapp:latest create
  1. Select choices, for example: fiber, svelte-ts, nginx
  2. See the error:
Error: [ERROR]exit status 127
Usage:
  cgapp create [flags]

... (other stuff from command help)
  1. Note that the backend folder is created and seems complete, but no other folders

Expected behavior:
Creation of all other folders and no errors.

Screenshots:
Screenshot from 2022-08-31 00-27-48

Additional context:
even changing with other framework combinations, same error is present.
Instead, running cgapp create without Docker and selecting same choices, all works ...

Hope you have enough info.
Thanks. Regards.

Some of the templates have dependencies that are not installed.

Required check list:

  • I'm gonna mark the checkboxes like this.
  • [x ] I didn't find in the Create Go App CLI repository's issues section similar feature request.
  • I understand, that the Create Go App CLI is Open Source and not-for-profit product.
  • [x ] This is not about third-party project, framework, package or technology.

Is your feature request related to a problem? Please describe.

I was just playing around with this, and noticed that some of the templates have OS level dependencies that also need to be installed.

For example npm... think that assuming golang is installed is a given, but it also possible to install golang per repo.

This is a sticky area, because users sometimes have the tool already installed.

Describe the solution you'd like:

The only viable solution is to contain the tools installed to the Repo itself, so as to not disrupt the other tools they have but also to allow versioning of tools between repos, etc.

One easy way to do this is with Makefiles. Its universal in that it works on all OS's ( even windows these days).

The makefile includes can be designed to pull the tool to a special folder and install it there.
Then the make file can manipulate the PATH variable to look for the tool locally.

It maybe that you assume that the developer is using Docker, and that you contain everything to docker ?.

Describe alternatives you've considered:

mage, hermit are some tools with help with this.

But they all place files outside the Repo, that you pulled. Makefiles can i feel do the job.

Screenshots:

Additional context:

React TypeScript Template

Hello,

I'd like to propose good React TypeScript template for your CLI. Let's make it a part of your org. I ready to make transfer. If you have issues of the template, let's discuss it. @koddr

Vite create err

Required check list:

  • I'm gonna mark the checkboxes like this.
  • I didn't find in the Create Go App CLI repository's issues section similar bug.
  • I understand, that the Create Go App CLI is Open Source and not-for-profit product.
  • This is not about third-party project, framework, package or technology.

My environment:

  • OS (uname -a): Window 11
  • Golang (go version): go1.16.7
  • Create Go App CLI (cgapp -v): 3.0.0

Describe the bug:


Create a new project via Create Go App CLI v3.0.0...

[?] Choose a backend framework: fiber
[?] Choose a frontend framework/library: vue-ts
[?] Choose a web/proxy server: nginx
[?] If everything is okay, can I create this project for you? ;) Yes

[OK] Backend was created with template `github.com/create-go-app/fiber-go-template`!
Error: [ERROR] [ERROR] Error: EPERM: operation not permitted, mkdir 'C:\Users\Kudou'
command not found: create-vite

Usage:
  cgapp create [flags]

Aliases:
  create, new

Flags:
  -h, --help       help for create
  -t, --template   enables to use custom backend and frontend templates

I was install vite , vue ,... as the global of npm. But when select vue-ts , it say command not found "create-vite"
Steps to reproduce the behavior:

  1. Go to ...
  2. Click on ...
  3. ...
  4. See error

Expected behavior:

Screenshots:

Additional context:

Frontend folder was not generated

Required check list:

  • I'm gonna mark the checkboxes like this.
  • I didn't find in the Create Go App CLI repository's issues section similar bug.
  • I understand, that the Create Go App CLI is Open Source and not-for-profit product.
  • This is not about third-party project, framework, package or technology.

My environment:

  • OS (uname -a): Windows 10
  • Golang (go version): go 1.17 windows/amd64
  • Create Go App CLI (cgapp -v): 3.3.1

Describe the bug:

I created some projects using cgapp, but none of them create the frontend folder. I tried to create vue and react frontend to clear if was the type of front.

Steps to reproduce the behavior:

  1. Go to project folder
  2. cgapp create
  3. choose backend framework (fiber)
  4. choose frontend framework (vue/react)
  5. choose web/proxy (nginx)
  6. Confirm with Yes

Expected behavior:

I was expecting to see all the folders, but the frontend folder is lacking.

Screenshots:
image

image

Additional context:

Deploy failled

Required check list:

  • I didn't find in the repository's issues section a similar bug.
  • I understand, this is an Open Source and not-for-profit product.
  • This is not about a third-party project, framework, or technology.

My environment:

  • OS (mac os):
  • Go (1.20):

Describe the bug:
A clear and concise description of what the bug is.

  • When I executed cgapp deploy. I got an error message: Error: [ERROR][ERROR]exec: "ansible-playbook": executable file not found in $PATH

Steps to reproduce the behavior:

  1. Create Go App with cgapp create
  2. Deploy: cgapp deploy

Screenshots:
If applicable, add screenshots to help explain your problem.
Screenshot 2023-08-01 at 23 45 16

Not able to create app

Required check list:

  • I'm gonna mark the checkboxes like this.
  • I didn't find in the Create Go App CLI repository's issues section similar bug.
  • I understand, that the Create Go App CLI is Open Source and not-for-profit product.
  • This is not about third-party project, framework, package or technology.

My environment:

  • OS (uname -a): Darwin xxxxx 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:08:47 PST 2022; root:xnu-8792.61.2~4/RELEASE_X86_64 x86_64
  • Golang (go version): go version go1.19 darwin/amd64
  • Create Go App CLI (cgapp -v): cgapp version 3.6.2

Describe the bug:

Steps to reproduce the behavior:

  1. Install cgapp via brew
  2. Run this command to create the app
bash-3.2$ cgapp create

  Create a new project via Create Go App CLI v3.6.2... 

[?] Choose a backend framework: fiber
[?] Choose a frontend framework/library: svelte-ts
[?] Choose a web/proxy server: traefik-acme-dns
[?] If everything is okay, can I create this project for you? ;) Yes

 [OK] Backend was created with template `github.com/create-go-app/fiber-go-template`! 
Error: [ERROR]exit status 1
Usage:
  cgapp create [flags]

Aliases:
  create, new

Flags:
  -h, --help       help for create
  -t, --template   enables to use custom backend and frontend templates

I checked the version and it's latest as I confirmed against the cgapp version in docker

bash-3.2$ cgapp -v
cgapp version 3.6.2
bash-3.2$ docker run --rm -it -v ${PWD}:${PWD} -w ${PWD} koddr/cgapp:latest -v
cgapp version 3.6.2

I tried creating the app via the docker and I am there also getting the error

bash-3.2$ docker run --rm -it -v ${PWD}:${PWD} -w ${PWD} koddr/cgapp:latest create

  Create a new project via Create Go App CLI v3.6.2... 

[?] Choose a backend framework: fiber
[?] Choose a frontend framework/library: svelte-ts
[?] Choose a web/proxy server: traefik-acme-dns
[?] If everything is okay, can I create this project for you? ;) Yes
Error: [ERROR][ERROR]Repository `github.com/create-go-app/fiber-go-template` was not cloned!
Usage:
  cgapp create [flags]

Aliases:
  create, new

Flags:
  -h, --help       help for create
  -t, --template   enables to use custom backend and frontend templates

Here are the versions for node and npm

bash-3.2$ node -v
v19.4.0
bash-3.2$ npm -v
9.2.0

I know that there have been earlier posts which discuss similar issues. But for those the docker way worked. I am facing issue even in the docker way.
It would help if we can get more verbose error logs.

Expected behavior:

Screenshots:

Additional context:

Add Database Mysql

Add Database Mysql

  • I'm gonna mark the checkboxes like this.
  • I didn't find in the Create Go App CLI repository's issues section similar feature request.
  • I understand, that the Create Go App CLI is Open Source and not-for-profit product.
  • This is not about third-party project, framework, package or technology.

image

Makefile generated is wrong

Required check list:

  • I didn't find in the repository's issues section a similar bug.
  • I understand, this is an Open Source and not-for-profit product.
  • This is not about a third-party project, framework, or technology.

My environment:

  • OS (uname -a): Linux 5.15.0-70-generic # 77-Ubuntu SMP x86_64
  • Go (go version): go version go1.20.3 linux/amd64

Describe the bug:
A clear and concise description of what the bug is.

The depency rule of the generated Makefile is wrong:

test:
        @if [ -d "$(FRONTEND_PATH)" ]; then cd $(FRONTEND_PATH) && npm run test; fi
        @if [ -d "$(BACKEND_PATH)" ]; then cd $(BACKEND_PATH) && go test ./...; fi

run: test
        @if [ -d "$(FRONTEND_PATH)" ]; then cd $(FRONTEND_PATH) && npm run dev; fi
        @if [ -d "$(BACKEND_PATH)" ]; then cd $(BACKEND_PATH) && $(MAKE) run; fi

build: test
...

Expected behavior:
A clear and concise description of what you expected to happen.

See for e.g. https://github.com/suntong/go-app-demos/blob/master/0A1-hello/makefile

run: build

This means run depends on build, whereas the generated Makefile means run depends on test, which is reversed.

Frontend folder is empty

Required check list:

  • I'm gonna mark the checkboxes like this.
  • I didn't find in the Create Go App CLI repository's issues section similar bug.
  • I understand, that the Create Go App CLI is Open Source and not-for-profit product.
  • This is not about third-party project, framework, package or technology.

My environment:

  • OS (uname -a): Linux abc 5.11.0-7614-generic #15~1618626693~20.10~ecb25cd-Ubuntu SMP Thu Apr 22 16:00:45 UTC x86_64 x86_64 x86_64 GNU/Linux
  • Golang (go version): go1.16.4
  • Create Go App CLI (cgapp -v): 2.1.1

Describe the bug:

After creating a project, the frontend folder is empty.
Output from create command:

❯ cgapp create

Create a new project via Create Go App CLI v2.1.1...

[?] Choose a backend framework: fiber
[?] Choose a frontend framework/library: vue
[?] Choose a web/proxy server: nginx
[?] If everything is okay, can I create this project for you? ;) Yes

[OK] Backend was created with template `fiber`!
[OK] Frontend was created with template `vue`!
[OK] Web/Proxy server configuration for `nginx` was created!
[OK] Ansible inventory, playbook and roles for deploying was created!

[INFO] Completed in 2 seconds!

* Please put credentials into the Ansible inventory file (`hosts.ini`) before you start deploying a project!
* Visit https://vitejs.dev/guide/ for more info about using the `vue` frontend template!
* A helpful documentation and next steps with your project is here https://create-go.app/

Have a happy new project! :)

Steps to reproduce the behavior:

  1. cgapp create
  2. Choose fiber
  3. Choose vue
  4. Choose nginx
  5. Choose Yes

Expected behavior:

Something existing in frontend folder.

[BUG] Unable to create new app on latest version when using a custom template.

Required check list:

  • I'm gonna mark the checkboxes like this.
  • I didn't find in the Create Go App CLI repository's issues section similar bug.
  • I understand, that the Create Go App CLI is Open Source and not-for-profit product.
  • This is not about third-party project, framework, package or technology.

My environment:

  • Linux Ubuntu SMP x86_64 GNU/Linux
  • go version go1.19.2 linux/amd64
  • cgapp version 3.6.2

Describe the bug:

Bug when creating a new app with custom template, In last prompt Y choice is still a No.

Steps to reproduce the behavior:

  1. run cgapp create -t
  2. In my case, I choose echo-go-template as backend template, so input github.com/create-go-app/echo-go-template
  3. Do the same thing for the frontend(pick your own frontend template).
  4. Lastly, type Y for the last prompt.

Expected behavior:

The app picks the no choice and closes.

Screenshots:

bug

It creates the project even if I type n and press enter

Required check list:

  • I'm gonna mark the checkboxes like this.
  • I didn't find in the Create Go App CLI repository's issues section similar bug.
  • I understand, that the Create Go App CLI is Open Source and not-for-profit product.
  • This is not about third-party project, framework, package or technology.

My environment:

  • OS (uname -a): Linux 5.4.0-109-generic #123~18.04.1-Ubuntu SMP Fri Apr 8 09:48:52 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
  • Golang (go version): go version go1.18.1 linux/amd64
  • Create Go App CLI (cgapp -v): cgapp version 3.6.1

Describe the bug:

Steps to reproduce the behavior:

  1. cgapp create
  2. select fiber
  3. select none
  4. select none
  5. it asks Yes/No, I type n

Expected behavior:
I expect it stop creation, but it creates files:

backend
hosts.ini
Makefile
playbook.yml
roles

Dependabot can't resolve your Go dependency files

Dependabot can't resolve your Go dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

dmitri.shuralyov.com/gpu/[email protected]: unrecognized import path "dmitri.shuralyov.com/gpu/mtl" (https fetch: Get https://dmitri.shuralyov.com/gpu/mtl?go-get=1: EOF)

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Error: [ERROR] [ERROR] When creating new app

Required check list:

  • I'm gonna mark the checkboxes like this.
  • I didn't find in the Create Go App CLI repository's issues section similar bug.
  • I understand, that the Create Go App CLI is Open Source and not-for-profit product.
  • This is not about third-party project, framework, package or technology.

My environment:

  • OS (uname -a): Darwin not.your.bussiness.net 19.6.0 Darwin Kernel Version 19.6.0: Thu Oct 29 22:56:45 PDT 2020; root:xnu-6153.141.2.2~1/RELEASE_X86_64 x86_64
  • Golang (go version): go version go1.17.1 darwin/amd64
  • Create Go App CLI (cgapp -v): cgapp version 3.0.0

Describe the bug:

It will create the backend directory but no frontend. Tried with different options for the front end choices with the same result/output.

Steps to reproduce the behavior:

Create a new project

% cgapp create                                                                            /tmp/test-go


Create a new project via Create Go App CLI v3.0.0...

[?] Choose a backend framework: fiber
[?] Choose a frontend framework/library: svelte-ts
[?] Choose a web/proxy server: traefik
[?] If everything is okay, can I create this project for you? ;) Yes

[OK] Backend was created with template `github.com/create-go-app/fiber-go-template`!
Error: [ERROR] [ERROR] 
Usage:
  cgapp create [flags]

Aliases:
  create, new

Flags:
  -h, --help       help for create
  -t, --template   enables to use custom backend and frontend templates

Expected behavior:

Have a fully working application

Frontend folder is missing

Required check list:

  • I'm gonna mark the checkboxes like this.
  • I didn't find in the Create Go App CLI repository's issues section similar bug.
  • I understand, that the Create Go App CLI is Open Source and not-for-profit product.
  • This is not about third-party project, framework, package or technology.

My environment:

  • OS (Darwin mofodoxs-MacBook-Pro-13.local 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:21 PDT 2021; root:xnu-7195.141.6~3/RELEASE_X86_64 x86_64):
  • Golang (go version go1.17.2 darwin/amd64):
  • Create Go App CLI (cgapp version 3.1.1):

Describe the bug:

I ran the command cgapp create, I chose my backend framework (Fiber), frontend framework/library (React) and web/proxy server (Traefik). But the frontend folder doesn't created after the process is completed.

Steps to reproduce the behavior:

  1. Run the cgapp create command
  2. Choose the necessary options for backend, frontend and web/proxy server information

Expected behavior:

After choosing the options, the frontend folder should exists when you opt in for the frontend option.

Screenshots:

CLI:
Screenshot 2021-10-12 at 17 03 30

Project folder:
Screenshot 2021-10-12 at 18 41 39

Thank you!

Getting error dial tcp: no such host

Required check list:

  • I'm gonna mark the checkboxes like this.
  • I didn't find in the Create Go App CLI repository's issues section similar bug.
  • I understand, that the Create Go App CLI is Open Source and not-for-profit product.
  • This is not about third-party project, framework, package or technology.

My environment:

  • OS (Darwin mofodoxs-MacBook-Pro-13.local 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:21 PDT 2021; root:xnu-7195.141.6~3/RELEASE_X86_64 x86_64):
  • Golang (go version go1.17.2 darwin/amd64):
  • Create Go App CLI (cgapp version 3.1.1):

Describe the bug:

How do I run the backend application. I've followed the instructions from the README.md in the backend folder but I kept getting this error:

migrate -path /Users/mofodox/Documents/projects/cgapptest/backend/platform/migrations -database "postgres://postgres:password@cgapp-postgres/postgres?sslmode=disable" up
error: dial tcp: lookup cgapp-postgres on 192.168.1.254:53: no such host
make: *** [migrate.up] Error 1

Steps to reproduce the behavior:

  1. Run the cgapp create command
  2. Choose the options available
  3. Rename the .env.example to .env (backend folder)
  4. Installed golang-migrate, gosec, swagger
  5. Run the application using the make command: make docker.run

Thank you!

Dependabot can't resolve your Go dependency files

Dependabot can't resolve your Go dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

github.com/create-go-app/cli/cmd: cannot find module providing package github.com/create-go-app/cli/cmd

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Failed without appropriate error on missing node lib.

Required check list:

  • I'm gonna mark the checkboxes like this.
  • I didn't find in the Create Go App CLI repository's issues section similar bug.
  • I understand, that the Create Go App CLI is Open Source and not-for-profit product.
  • This is not about third-party project, framework, package or technology.

My environment:

  • OS (uname -a): Darwin Sebastians-MacBook-Pro.local 19.6.0 Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64 x86_64
  • Golang (go version): go version go1.15.6 darwin/amd64
  • Create Go App CLI (cgapp -v): cgapp version 1.6.10

Describe the bug:

When running cgapp create the initiation of the frontend failed. It failed because I didn't have node installed. A better error message here would improve the UX.
Steps to reproduce the behavior:

  1. Have system without nodejs installed.
  2. Run cgapp create
  3. Notice the sparse error message.

Expected behavior:

A clear error message describing the reason for the error.

Screenshot
image

Cheers!
Thank you for your hard work.

Docker error during cloned github

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

[?] Choose a frontend framework/library: vanilla-ts
[?] Choose a web/proxy server: nginx
[?] If everything is okay, can I create this project for you? ;) Yes

Error: [ERROR][ERROR]
Repositorygithub.com/create-go-app/net_http-go-template was not cloned!
Usage:

Adding robust web frameworks

Required check list:

  • I'm gonna mark the checkboxes like this.
  • I didn't find in the Create Go App CLI repository's issues section similar feature request.
  • I understand, that the Create Go App CLI is Open Source and not-for-profit product.
  • This is not about third-party project, framework, package or technology.

Is your feature request related to a problem? Please describe.

Currently the cli only supports net/http and fiber. net/http is great for a lightweight and clean backend but a bit slower to build with. Fiber is a nice framework designed to ease things up for fast development, however does not have a lot of feature support as it is built on top of fasthttp. One of the main issues is that fiver does not support HTTP/2.

Describe the solution you'd like:

I propose adding a robust framework that is compatible with the stdlib. Fiber is blazing fast, but faster than necessary at cost of not properly implementing a protocol and incompatibilities is not really the best. So I suggest adding other frameworks such as: Echo , Gin , Chi.

Describe alternatives you've considered:

I guess the alternative here is just building it from scratch? Not really any alternative solutions just would be nice to have other frameworks available.

Dependabot can't resolve your Go dependency files

Dependabot can't resolve your Go dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

github.com/create-go-app/cli/cmd: cannot find module providing package github.com/create-go-app/cli/cmd

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Rename imports ?

Required check list:

  • I'm gonna mark the checkboxes like this.
  • I didn't find in the Create Go App CLI repository's issues section similar feature request.
  • I understand, that the Create Go App CLI is Open Source and not-for-profit product.
  • This is not about third-party project, framework, package or technology.

Is your feature request related to a problem? Please describe.

BTW the concept of this tool is a great idea.

It would be cool if is renamed the imports though. Then you have the code with the namespace that you need for your project.

For example....

In https://github.com/create-go-app/net_http-go-template/blob/master/app/controllers/user_controller.go#L8 you have the import namespace of "github.com/create-go-app/net_http-go-template".

The algo would replace "github.com/create-go-app/net_http-go-template" with "GIT_HOST_NAME/REPO_ORG/REPO_NAME" that the user provides on the CLI.


I don't know how much in demand this would be, but i imagine lots of devs are having to go through and do a find replace on the generated files ??? I did not see a closed issue and discussion for this idea though, so maybe no one cares about this feature.

If you care about this feature, add a +1 or comment to indicate if you like the idea.

Describe the solution you'd like:

Just add a namespace option to the cli.

Then after it clones it can use the golang import tool to rename the imports. Cant remember off the top of my head the golang command to do that, but you can find it if you look.

For JS, i think it will need to do a find replace.

Within each template on github you just need a JSON or other file that has the current namespace, so that the find replace knows what to look for.

Describe alternatives you've considered:

Screenshots:

Additional context:

Base URL /api in swagger doc is wrong

Required check list:

  • I didn't find in the repository's issues section a similar bug.
  • I understand, this is an Open Source and not-for-profit product.
  • This is not about a third-party project, framework, or technology.

My environment:

  • OS (uname -a): Linux 5.15.0-70-generic # 77-Ubuntu SMP x86_64
  • Go (go version): go version go1.20.3 linux/amd64

Describe the bug:
A clear and concise description of what the bug is.

Swagger "Base URL" of /api (in swagger doc) is wrong

image

...

Steps to reproduce the behavior:

  1. make swag
  2. build and run the app

Expected behavior:
A clear and concise description of what you expected to happen.

image

Either add /api to the API interface, or correct the Swagger "Base URL" of /api in swagger doc.

Backend module name from user's input.

Required check list:

  • I'm gonna mark the checkboxes like this.
  • I didn't find in the Create Go App CLI repository's issues section similar feature request.
  • I understand, that the Create Go App CLI is Open Source and not-for-profit product.
  • This is not about third-party project, framework, package or technology.

Is your feature request related to a problem? Please describe.

No! But for beginner your backend module name is a little bit confusing.

Describe the solution you'd like:

Your CLI tool has 4 inputs from user.
How about adding another input for the backend module name from user.
And then the user can see his module name in the go.mod file.

Describe alternatives you've considered:

Screenshots:

Additional context:

cannot create app in M1 mac

Required check list:

  • I'm gonna mark the checkboxes like this.
  • I didn't find in the Create Go App CLI repository's issues section similar bug.
  • I understand, that the Create Go App CLI is Open Source and not-for-profit product.
  • This is not about third-party project, framework, package or technology.

My environment:

  • OS (uname -a): Darwin USERMN001 21.6.0 Darwin Kernel Version 21.6.0: Sun Nov 6 23:31:13 PST 2022; root:xnu-8020.240.14~1/RELEASE_ARM64_T6000 arm64
  • Golang (go version): go version go1.19.5 darwin/arm64
  • Create Go App CLI (cgapp -v): [1] 53755 killed cgapp -v

Describe the bug:

Steps to reproduce the behavior:

I typed the cgapp create command, then came out an error the below screenshot.
I have looked for some similar issues like this in the websites.
However I couldn't find the error for m1 mac.

Expected behavior:

I would like to genereate a project properly.

Screenshots:

image

Additional context:

Visiting the website "https://create-go.app" returns a Privacy Error

Bug Description
Visiting the website, returns the following error:
NET::ERR_CERT_COMMON_NAME_INVALID
The Certificate issued in the website is invalid.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://create-go.app'
  2. See error

Screenshots
Screenshot_20200625_144848

My environment:

  • OS :
    Linux Ubuntu 18.04 x86_64
  • Browser:
    Brave Browser (chromium derivative)

Additional context
The error seems to be caused by an invalid certificate issued from let's encrypt

front-end folder was not created

Required check list:

  • [✔️] I didn't find in the repository's issues section a similar bug.
  • [✔️] I understand, this is an Open Source and not-for-profit product.
  • [✔️] This is not about a third-party project, framework, or technology.

My environment:

  • OS (uname -a): win 11
  • Go (go version): 1.21.0
  • npm 9.8.1
  • go-cli 4.0.1

Describe the bug:
_I created a project but front-end folder didn't create.

Steps to reproduce the behavior:

  1. run cgapp create
  2. select fiber as backend framework
  3. select next-ts as front-end
  4. select traefik
  5. select Yes to start create

Expected behavior:
A clear and concise description of what you expected to happen.
i expected that front-end, backend , and other folders created but there was no front-end here

Screenshots:
image
image

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.