Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playground client not accessible remotely #2973

Closed
1 task done
tdiesler opened this issue Apr 9, 2021 · 5 comments
Closed
1 task done

Playground client not accessible remotely #2973

tdiesler opened this issue Apr 9, 2021 · 5 comments

Comments

@tdiesler
Copy link

tdiesler commented Apr 9, 2021

This issue came up while taking part in the pioneer program

On MacOS there seem to be numerous issues with compiling the English Auction contract. Instead of trying to resolve those, I moved to a Debial10 hosted on GCE. I got the contract compiled and the playground server/client started.

However, because this is a remote machine I cannot access the playground-client on: https://localhost:8009

Instead, I'd like the playground-client to bind to 0.0.0.0, so that I can use the remote IP.

CrossRef: input-output-hk/plutus-pioneer-program#3

Diagnostic info:

  • I was using the:
    • Plutus Playground
@tdiesler
Copy link
Author

tdiesler commented Apr 9, 2021

Adding host: "0.0.0.0" in plutus/plutus-playground-client/webpack.config.js seems to work ...

    devServer: {
        contentBase: path.join(__dirname, "dist"),
        compress: true,
        host: "0.0.0.0",
        port: 8009,
        https: true,
        proxy: {
            "/api": {
                target: 'http://localhost:8080'
            }
        }
    },

Not sure if this can generally be done to go forward.

@KevinHock
Copy link

For security reasons, defaulting to 0000 seems not good

@yangzai
Copy link

yangzai commented Apr 22, 2021

I spent a long time tweaking my router and firewalls before realising it was a webpack issue: https://webpack.js.org/configuration/dev-server/#devserverhost

@kk-hainq
Copy link
Contributor

kk-hainq commented Apr 23, 2021

One can also create an SSH tunnel between the local machine and the cloud instance with something like:

ssh -i xxx.pem -N -L 8009:localhost:8009 xxx@xx.xxx.xx.xxx

To access the client through https://localhost:8009 just fine.

@tdiesler
Copy link
Author

I think we can close this

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

No branches or pull requests

4 participants