Skip to content

Commit

Permalink
[refactor]: refactored the README.md file to provide usage instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
goodylili committed Sep 17, 2023
1 parent 1281d95 commit 5356040
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ manually initializing a project.

Certainly, here's the directory explanation with clickable links for your GitHub README.md:


1. **[cmd](./cmd)**: This directory contains the main entry point for your server application.
- **[server](./cmd/server)**: Subdirectory for the server application.
- **[main.go](./cmd/server/main.go)**: The main Go source code file for your server application.
Expand All @@ -46,6 +47,7 @@ Certainly, here's the directory explanation with clickable links for your GitHub
6. **[static](./static)**: Contains static assets like images.
- **[img.jpg](./static/img.jpg)**: An image file used in your application.


Each of these subdirectories serves a specific purpose in organizing your application's code and resources. The
structure helps keep your codebase modular and maintainable by separating concerns and functionalities into different
directories.
Expand All @@ -59,20 +61,24 @@ You can use the `gonew` command or the bash [creator.sh](./scripts/creator.sh) s
Using `gonew` will ensure that you also get additional file and file content. Google `gonew` and check the LogRocket
blog for a tutorial I wrote on how you can use `gonew` to streamline your apps' development.


First, Install `gonew` with this command line


```shell
go install golang.org/x/tools/cmd/gonew@latest
```

Next, run this command to complete the setup with `gonew` and start building.


```shell

gonew -dir <directory-you-want> -v github.com/Goodnessuc/MyGoWebAppTemplate <your-project-name>

```


The command will create the exact structure of the project as is on GitHub.

### ⚙️ Using the Bash Script
Expand All @@ -83,19 +89,23 @@ The bash script also affords you more control over the contents of your app file

Run this command in the terminal of your project's working directory to create the directory structure and files


```bash
mkdir -p cmd/server config internal/handlers internal/utils scripts static docs

touch .gitignore LICENSE Makefile README.md Dockerfile .env.example go.mod go.sum scripts/PushaG.sh

```


You've successfully set up your project's structure with the Bash Script.


## 🛠️ Technologies and Tools
Go - The programming language used

GitHub Actions - GitHub CI/CD tool

Make - Build automation tool


Expand Down

0 comments on commit 5356040

Please sign in to comment.