Skip to content

Commit 08f31f3

Browse files
committed
Fix ports
1 parent 504328a commit 08f31f3

5 files changed

Lines changed: 18 additions & 17 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ A web application that calculates and displays moon rise and set times for any l
6161
- **IMPORTANT**: Restrict the API key (recommended for production):
6262
- **Application restrictions**: Set HTTP referrers
6363
- Add your domain: `https://yourdomain.com/*`
64-
- For local development: `http://localhost:8181/*`
64+
- For local development: `http://localhost:8484/*`
6565
- **API restrictions**: Restrict key to "Maps JavaScript API" only
6666
- Set usage quotas to prevent abuse
6767

@@ -76,7 +76,7 @@ A web application that calculates and displays moon rise and set times for any l
7676
go run moon.go
7777
```
7878

79-
The server will start on `http://localhost:8181`
79+
The server will start on `http://localhost:8484`
8080

8181
### Windows Development
8282

@@ -277,7 +277,7 @@ server {
277277
server_name your-domain.com;
278278
279279
location / {
280-
proxy_pass http://localhost:8181;
280+
proxy_pass http://localhost:8484;
281281
proxy_http_version 1.1;
282282
proxy_set_header Upgrade $http_upgrade;
283283
proxy_set_header Connection 'upgrade';
@@ -427,7 +427,7 @@ moon/
427427

428428
### Server Settings
429429

430-
- **Port**: 8181 (default)
430+
- **Port**: 8484 (default)
431431
- **Read Timeout**: 5 seconds
432432
- **Write Timeout**: 5 seconds
433433
- **Idle Timeout**: 120 seconds

build.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ if "%GOOGLE_MAPS_API_KEY%"=="your_google_maps_api_key_here" (
5454
echo API Key loaded: %GOOGLE_MAPS_API_KEY:~0,10%...
5555
echo Production mode: %PROD%
5656
echo.
57-
echo Starting server on http://localhost:8181
57+
echo Starting server on http://localhost:8484
5858
echo Press Ctrl+C to stop the server
5959
echo.
6060

index.html

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,14 @@ <h3>Location</h3>
4646
</div>
4747
</div>
4848
<div class="input-group">
49-
<label class="input-label" for="timezone">Timezone</label>
50-
<select id="timezone" onchange="timezoneChanged()" aria-label="Select timezone">
51-
<option value="">Loading timezones...</option>
52-
</select>
53-
<input id="zon" type="hidden" value="" />
49+
<label class="input-label" for="timezone">Timezone</label>
50+
<select id="timezone" onchange="timezoneChanged()" aria-label="Select timezone">
51+
<option value="">Loading timezones...</option>
52+
</select>
53+
<input id="zon" type="hidden" value="" />
54+
</div>
55+
</div>
56+
5457
<div class="results-section">
5558
<h3>Moon Times for Today</h3>
5659
<div class="result-item">

moon.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func makeHTTPServer() *http.Server {
114114

115115
func main() {
116116
var flgProduction bool
117-
var httpPort string = ":8181"
117+
var httpPort string = ":8484"
118118
if os.Getenv("PROD") == "True" {
119119
flgProduction = true
120120
} else {
@@ -240,15 +240,15 @@ func calendar(w http.ResponseWriter, r *http.Request) {
240240

241241
func handleIndex(w http.ResponseWriter, r *http.Request) {
242242
w.Header().Set("Content-Type", "text/html; charset=utf-8")
243-
243+
244244
type IndexData struct {
245245
GoogleMapsKey string
246246
}
247-
247+
248248
data := IndexData{
249249
GoogleMapsKey: getGoogleMapsKey(),
250250
}
251-
251+
252252
if templates != nil {
253253
if err := templates.ExecuteTemplate(w, "index.html", data); err != nil {
254254
log.Printf("Error executing index template: %v", err)
@@ -304,8 +304,6 @@ func gettimes(w http.ResponseWriter, r *http.Request) {
304304
json.NewEncoder(w).Encode(mydata)
305305
}
306306

307-
308-
309307
func handleFavicon(w http.ResponseWriter, r *http.Request) {
310308
http.ServeFile(w, r, "favicon.ico")
311309
}

run.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ if "%GOOGLE_MAPS_API_KEY%"=="" (
3434
exit /b 1
3535
)
3636

37-
echo Starting server on http://localhost:8181
37+
echo Starting server on http://localhost:8484
3838
echo Press Ctrl+C to stop the server
3939
echo.
4040

0 commit comments

Comments
 (0)