Skip to content

Commit 422cd95

Browse files
authored
Create README.md
1 parent a401e24 commit 422cd95

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed

README.md

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Golang Project 🚀🚀
2+
3+
Welcome to my Go (Golang) project! In this project, I developed a HTTP server, which processes incoming requests and includes a graceful shutdown mechanism. The project is hosted on AWS using Elastic Beanstalk for easy scaling and management. This was a fantastic learning experience where I got hands-on with Go, AWS services, and web application deployment.
4+
5+
## Features
6+
7+
- **HTTP Server**: Handles GET requests and responds with a message.
8+
- **Graceful Shutdown**: Proper handling of shutdown signals for a smooth server stop.
9+
- **AWS Deployment**: Deployed on AWS Elastic Beanstalk for scalability and management.
10+
11+
## Technologies Used
12+
13+
- **Go (Golang)**: Backend programming language.
14+
- **AWS Elastic Beanstalk**: For deployment, load balancing, and auto-scaling.
15+
- **AWS EC2**: Virtual servers to run the application.
16+
- **SQLite**: Managed relational database service for data persistence.
17+
- **AWS CloudWatch**: For monitoring application logs and health checks.
18+
19+
## Getting Started
20+
21+
### Prerequisites
22+
23+
- **Go**: You need Go installed on your local machine. You can download it from [here](https://golang.org/dl/).
24+
- **AWS CLI**: To interact with AWS from the command line, you'll need the AWS CLI installed. Follow the [AWS CLI installation guide](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html).
25+
- **Elastic Beanstalk CLI**: Install the AWS Elastic Beanstalk CLI. You can follow the installation steps [here](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-install.html).
26+
27+
### How to Clone the Project
28+
29+
1. Clone the repository to your local machine:
30+
31+
```bash
32+
git clone https://github.com/your-username/golang-first-project.git
33+
cd golang-first-project
34+
```
35+
36+
2. Make sure you have Go installed:
37+
38+
```bash
39+
go version
40+
```
41+
42+
3. Install dependencies:
43+
44+
```bash
45+
go mod tidy
46+
```
47+
48+
4. Run the application locally:
49+
50+
```bash
51+
go run main.go -config config/local.yaml
52+
```
53+
54+
This should start the server locally at `localhost:8080`.
55+
56+
## Features
57+
58+
- **HTTP GET handler**: Responds to requests at `/` with a simple message.
59+
- **Graceful Shutdown**: Handles system shutdown signals (`SIGINT`, `SIGTERM`) gracefully.
60+
- **AWS Deployment**: Automatically scales the application based on demand.
61+
62+
## Troubleshooting
63+
64+
- **Port already in use**: If you encounter the "address already in use" error, ensure that no other process is using port 8080 by running:
65+
66+
```bash
67+
lsof -i :8080
68+
```
69+
70+
You can kill the process using:
71+
72+
```bash
73+
kill -9 <PID>
74+
```
75+
76+
- **Deployment issues on AWS**: Make sure the Elastic Beanstalk CLI is correctly configured and the AWS environment is properly set up.
77+
78+
## Contributing
79+
80+
If you'd like to contribute to this project, feel free to fork the repository, submit a pull request, or open an issue for feedback. All contributions are welcome!
81+
82+
## License
83+
84+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

0 commit comments

Comments
 (0)