← Back to context

Comment by csomar

3 months ago

I am failing to get it work on a "custom" setup. I run my own server with localhost pointed to the domain, with HTTPS on locally generated certificates.

I tried

    npx @jsx-tool/jsx-tool start --logging --server-host codeinput.com --server-protocol https --server-port 443 --insecure

but got

    [jsx-tool] Proxy server running at http://localhost:4000
    [jsx-tool] Forwarding to https://codeinput.com:443
    [jsx-tool] WebSocket server listening on ws://localhost:12021
    [jsx-tool] LSP worker exited with code 1
    [jsx-tool] Restarting LSP worker...
    [jsx-tool] LSP worker already started
    (node:7881) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
    (Use `node --trace-deprecation ...` to show where the warning was created)
    [jsx-tool] Proxy error: unable to verify the first certificate; if the root CA is installed locally, try running Node.js with --use-system-ca
    [jsx-tool] Proxy error: unable to verify the first certificate; if the root CA is installed locally, try running Node.js with --use-system-ca

Maybe you should explain a bit what the server does and what it needs to connect to? why does it need some kind of a "proxy"? I understand you are trying to make a simple one click/command solution but some setups are more complicated than the standard yarn dev nextjs app.

Hey csomar. If you switch over to discord I can work through it with you there.

> I understand you are trying to make a simple one click/command solution but some setups are more complicated than the standard yarn dev nextjs app.

I agree our docs are totally lacking on the more advanced dns setups! I'm so sorry.

> Maybe you should explain a bit what the server does and what it needs to connect to? why does it need some kind of a "proxy"?

If you don't do the manual installation where you point to the web-socket server in your <head>, it will inject that tag into your <head> tag. The web socket it how the chrome extension communicates with your file system.

You don't need the proxy for most things. It's fine to continue to just use codeinput.com as long as you have a way of making the websocket url discoverable to the extension.

The only other use case for the proxy is if you are on a page that has over 10k react fibers and are not using vite. This comes up a lot in things like CRMs or Next projects with a lot of 3rd party dependencies. In that case we have to find and replace a part of the react source that limits the number of React Fibers with source maps from 10k to 1m.

I tried to give a system design overview here but I will be the first to admit that it's pretty lacking https://jsxtool.com/docs/dev-server/system-design