Running the app
# support
l
Trying to run production mode of the app via
npm run start
/
http-server
and don't think I'm doing so properly:
Copy code
[2023-04-17T17:56:36.044Z]  "GET /register" Error (404): "connect ECONNREFUSED ::1:3000"
[2023-04-17T17:56:36.046Z]  "GET /register" Error (404): "Not found"
[2023-04-17T17:56:36.047Z]  "GET /register" Error (404): "Not found"
Any tips?
Update: fixed the 404s but the buttons in forms don't work and I'm getting
webpack-dev-server
errors in console?
r
HI LJNIC, are you running on your computer on or some kind of cloudn environment
I think the first step would be to make sure your server is working correctly. Are things looking good on the server healthcheck? https://www.medplum.com/docs/contributing/run-the-stack#start-the-servers
l
healthcheck is good:
{"ok":true,"version":"2.0.15-630cc2fc","postgres":true,"redis":true}
it's running on an aws EC2 instance, don't want to use the full aws setup as we won't be using aws in prod
r
Can you paste the webpack-dev-server errors?
l
Copy code
[webpack-dev-server] 
error { target: WebSocket, isTrusted: true, srcElement: WebSocket, currentTarget: WebSocket, eventPhase: 2, bubbles: false, cancelable: false, returnValue: true, defaultPrevented: false, composed: false, … }
​
bubbles: false
​
cancelBubble: false
​
cancelable: false
​
composed: false
​
currentTarget: null
​
defaultPrevented: false
​
eventPhase: 0
​
explicitOriginalTarget: WebSocket { url: "ws://54.175.233.236:3000/ws", readyState: 3, bufferedAmount: 0, … }
​
isTrusted: true
​
originalTarget: WebSocket { url: "ws://54.175.233.236:3000/ws", readyState: 3, bufferedAmount: 0, … }
​
returnValue: true
​
srcElement: WebSocket { url: "ws://54.175.233.236:3000/ws", readyState: 3, bufferedAmount: 0, … }
​
target: WebSocket { url: "ws://54.175.233.236:3000/ws", readyState: 3, bufferedAmount: 0, … }
​
timeStamp: 7955
​
type: "error"
​
<get isTrusted()>: function isTrusted()
​
<prototype>: EventPrototype { composedPath: composedPath(), stopPropagation: stopPropagation(), stopImmediatePropagation: stopImmediatePropagation(), … }
index.js:493:22
    logger index.js:493
    getLogger index.js:634
    error index.js:156
    onerror WebSocketClient.js:15
    (Async: EventHandlerNonNull)
    WebSocketClient WebSocketClient.js:14
    initSocket socket.js:27
    initSocket socket.js:51
    (Async: setTimeout handler)
    initSocket socket.js:50
    (Async: EventHandlerNonNull)
    onClose WebSocketClient.js:34
    initSocket socket.js:34
    initSocket socket.js:51
I also get this when trying to log in, this is maybe because it's not under https?
157 Views