Skip to content

Commit 38de696

Browse files
committed
move static server to 8082 to prep for apache
1 parent b423bc6 commit 38de696

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

multiple-servers/IMPLEMENTATION.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,11 @@ Copied over from server-database, with file split up:
5050
- `api.go` for the DB connection & HTTP handlers
5151

5252
This has the same setup steps as server-database, so those can be copied over.
53+
54+
## Apache
55+
56+
Switch static server over to 8083.
57+
58+
`brew install apache2` (or `brew install httpd`?)
59+
60+
`brew services restart httpd`

multiple-servers/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![Architecture of this solution](./readme-assets/architecture.png)
44

5-
Create file server to serve static HTML files. Create an API server that serves JSON from a database. Run the API and file server as two separate servers. Try to load the website & see CORS issue. Put apache in front of the file server and the API so they are on a single port and hostname. Learn about how to run services in VMs in the cloud. Replicate this local setup in the cloud on a single VM, with all services running on the same host. Route requests to the service.
5+
Create file server to serve static HTML files. Create an API server that serves JSON from a database. Run the API and file server as two separate servers. Try to load the website & see CORS issue. Fix issues with `Access-Control-Allow-Origin`. Put apache in front of the file server and the API so they are on a single port and hostname. Learn about how to run services in VMs in the cloud. Replicate this local setup in the cloud on a single VM, with all services running on the same host. Route requests to the service.
66

77
Timebox: 10 days
88

multiple-servers/cmd/static-server/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ func main() {
1818

1919
static.Run(static.Config{
2020
Dir: absPath,
21-
Port: 8080,
21+
Port: 8082,
2222
})
2323
}

0 commit comments

Comments
 (0)