appengine_samples icon indicating copy to clipboard operation
appengine_samples copied to clipboard

connecting server component to web component

Open XilaiZhang opened this issue 3 years ago • 3 comments

Hello, I am trying to get the client server model to work. I first run dart run build runner serve web:7777 to serve the web component on http://localhost:7777. And then I run export DART_PUB_SERVE=http://localhost:7777, and finally dart bin/server.dart. However, when I visit localhost:8080, it always could not find index.html and shows 404. Am I missing any of the steps? Thanks in advance for any help!

XilaiZhang avatar Jan 21 '22 19:01 XilaiZhang

You might try loading localhost:7777 into the browser. :-) I think there's another port for an admin interface, but it's been a few years.

tmst avatar Jan 22 '22 21:01 tmst

Hello Tom, thanks for the reply. In my case, in browser localhost:7777 only serves the web component, the button on web page is not clickable and does not handle the server requests such as /items . Meanwhile, the correct server logic is served on localhost:8080. Is there a way I can get the server hooked up with the web component, so that the server logic triggers the correct web pages?

XilaiZhang avatar Jan 22 '22 21:01 XilaiZhang

Sorry, Xilai. I think you mean it only serves the HTML component rather than Javascript, etc. But it's been so long I can't recall. Seems like there was configuration file I consulted for the locations of stuff.

tmst avatar Jan 22 '22 22:01 tmst