Skip to content

Commit e7ae96c

Browse files
committed
Expose chat-app container to localhost for development
1 parent 6dc2cfb commit e7ae96c

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

backend/docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ services:
108108
container_name: chat-app
109109
networks:
110110
- backend-net
111+
ports:
112+
- "8000:8000"
111113
depends_on:
112114
- cassandra-node1
113115

backend/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ func main() {
112112
mux.HandleFunc("/refresh", middleware.AddCorsHeaders(auth.RefreshAccessTokenHandler))
113113

114114
go func() {
115-
log.Println("Starting HTTPS server on https://127.0.0.1:8000")
116-
log.Fatal(srv.ListenAndServeTLS("full-cert.crt", "private-key.key"))
115+
// log.Fatal(srv.ListenAndServeTLS("full-cert.crt", "private-key.key"))
116+
log.Fatal(srv.ListenAndServe())
117117
}()
118118

119119
wg.Wait()

frontend/app/components/Login.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default function Login() {
1818
if (validator.isEmail(loginData.email) &&
1919
loginData.password !== ""
2020
) {
21-
fetch('https://127.0.0.1:8000/api/login', {
21+
fetch('http://localhost:8000/api/login', {
2222
method: 'POST',
2323
headers: {
2424
'Content-Type': 'application/json'

0 commit comments

Comments
 (0)