Closed diickens closed 4 years ago
public: Public('web'), // it is a duplicate
getPages: [
GetPage(name: '/', page: () => Home()), // this
],
Only remove getPages:
import 'package:get_server/get_server.dart';
void main() {
runApp(GetServer(
public: Public('web'), // it will track your index.html on web folder file to '/'
));
}
Thanks for your answer. Tried your code but still get the same error.
[GETX] Instance "GetServerController" has been created
[GETX] Instance "String?" has been created with tag "jwtKey"
[GETX] Server started on: 0.0.0.0:8080
[GETX] Instance "GetServerController" has been initialized
Error: Unsupported operation: ServerSocket.bind
at Object.throw_ [as throw] (http://localhost:57703/dart_sdk.js:5067:11)
at Function._bind (http://localhost:57703/dart_sdk.js:60033:17)
at Function.bind (http://localhost:57703/dart_sdk.js:60025:32)
at Function.bind (http://localhost:57703/dart_sdk.js:199714:30)
at Function.bind (http://localhost:57703/dart_sdk.js:193049:32)
at server.GetServerController.new.[_getHttpServer] (http://localhost:57703/packages/get_server/src/widgets/pageable.dart.lib.js:1708:33)
at server.GetServerController.new.startServer (http://localhost:57703/packages/get_server/src/widgets/pageable.dart.lib.js:1641:52)
at startServer.next (
Hello
When starting a new Flutter web project and using the the example Code of the get_server readme.md:
I get the following error:
Error: Unsupported operation: ServerSocket.bind at Object.throw_ [as throw] (http://localhost:51136/dart_sdk.js:4328:11) at Function._bind (http://localhost:51136/dart_sdk.js:57652:17) at Function.bind (http://localhost:51136/dart_sdk.js:57640:32) at Function.bind (http://localhost:51136/dart_sdk.js:182778:30) at Function.bind (http://localhost:51136/dart_sdk.js:176117:32) at server_main.GetServer.new.start (http://localhost:51136/packages/get_server/src/widgets/pageable.dart.lib.js:1141:31) at Object.runApp (http://localhost:51136/packages/get_server/src/widgets/pageable.dart.lib.
Any idea how to fix this?
Best regards Marc