GooSushi is a Dart 2 compliant sample HTTP server application utilizing HttpSession class. Do not use this code without security and stability enhancement for actual applications. This is a Dart code sample and an attachment to the "Dart 2 Language Gide" written in Japanese.
This repository consists of the following source codes.
-
SimpleShoppingCartServer.dart : GooSushi Simple shopping cart application server utilizing HttpSession class. Can be accessed by
http://localhost:8080/GooSushi
. -
HttpSessionTest.dart : Simple server for better understanding of the HttpSession session management mechanism. Can be accessed by
http://localhost:8080/SessionTest
- Download this repository, uncompress and rename the folder to "http_session".
- From IDE such as IntelliJ, File > Open and select this folder.
- Run the bin/shopping_cart_server.dart or / and bin/http_session_test.dart as server.
- Access these servers from your two or more different browsers (Chrome, Firefox, IE..) concurrently as
http://localhost:8080/GooSushi
orhttp://localhost:8080/SessionTest
respectively.
You can change following parameters:
-
final LOG_REQUESTS = false; // Set true to get detailed log.
-
final int MaxInactiveInterval = 60; // Set session timeout in seconds.
This sample is licensed under MIT License.