Skip to content

Remove the node.js development server#97

Open
stewartfrancis wants to merge 2 commits into
mainfrom
remove-nodejs-dev-server
Open

Remove the node.js development server#97
stewartfrancis wants to merge 2 commits into
mainfrom
remove-nodejs-dev-server

Conversation

@stewartfrancis

Copy link
Copy Markdown
Collaborator

Remove the node.js development server used for testing the z/OS connect APIs in designer, and replace with nginx, so we don't have to maintain a separate server

…ct APIs in designer, and replace with nginx, so we don't have to maintain a separate server

Signed-off-by: Stewart Francis <stewartfrancis@uk.ibm.com>

@AndrewTwydell AndrewTwydell left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Stew, testing now but looks good! Will merge shortly

@AndrewTwydell

Copy link
Copy Markdown
Collaborator

@stewartfrancis when running it locally, the frontend was still requesting http://localhost:3001/api/customers/1234, we actually want to request http://localhost:9080/customers/1234 (no /api).

I don't know if the location block in nginx is supposed to resolve this?

Bob advised this instead which worked when running locally, but I don't know if you had wider reasons for your nginx conf

    # Proxy API requests to the backend zosConnect service
    # Frontend makes requests to /api/* which nginx forwards to zosConnect:9080/*
    location /api/ {
        proxy_pass http://zosConnect:9080/;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }

Signed-off-by: Stewart Francis <stewartfrancis@uk.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants