-
Notifications
You must be signed in to change notification settings - Fork 5
plugin and app engine #1
Comments
Can you post your |
Sure.. so I have a project, that I just want to wrap for the So here's the main of my app-engine-wrapper project import 'package:appengine/appengine.dart';
import 'package:redstone/server.dart' as app;
import '../../pkg/server/bin/main.dart' as server;
void main() {
logger.info("Running server's main");
server.mainAppEngine().then((_) {
runAppEngine((HttpRequest request) {
app.handleRequest(request);
}
}).catchError((e) => logger.severe(e));
} Here's the function that setups redstone: Future mainAppEngine() async {
restPort = 4040;
hostname = '0.0.0.0';
await startGamesServer();
}
Future<HttpServer> startGamesServer() {
logger.level = Level.FINE;
setupLogging();
app.addPlugin(getWebSocketPlugin());
app.addModule(modules.getRestModule());
return app.start(address: hostname, port: restPort).catchError(showError);
} in |
Yeah, I used the code provided by @luizmineo in that issue, and it works fine for |
I notices that the code provided by Luiz mentions that you have to not call |
You should call app.setup(); //<== Important
runAppEngine(app.handleRequest).catchError (...); If that doesn't work, try a Redstone Hello World without websockets on App Engine just to make sure its really a problem of the plugin. |
Have you guys successfully deployed redstone with the web_socket_plugin to app engine managed vms?
I'got the the normal resources matching the end points, but it seems that on app engine (and even locally on gcloud) the requests never go to the methods
This snippet works fine when I launch the server without gcloud. However, when I check the logs at startup I see that RedStone did its setup correctly (I suppose?)
configured websocket handler for /ws: socket_handler.WebSocketEndPoint
When querying the end point on my client I keep getting
failed: Error during WebSocket handshake: Unexpected response code: 404
The text was updated successfully, but these errors were encountered: