aboutsummaryrefslogtreecommitdiffstats
path: root/server/.project
diff options
context:
space:
mode:
authorKostya <mail@sartin.in>2026-10-09 12:55:16 +0300
committerKostya <mail@sartin.in>2026-10-09 12:55:40 +0300
commit9a62e94261e6531c6b60d296322e0cef2a5b21e1 (patch)
treef684d5b0f350161b331e53149e7c8dabb9e1c885 /server/.project
parent246c1ab5ffce1a1bb3c0534868b29f6e4c862a62 (diff)
downloadguess-market-9a62e94261e6531c6b60d296322e0cef2a5b21e1.tar.gz
guess-market-9a62e94261e6531c6b60d296322e0cef2a5b21e1.tar.xz
guess-market-9a62e94261e6531c6b60d296322e0cef2a5b21e1.zip
server: add Tomcat webapp module with shared engine and CORS
Exercise 3 moves the market behind a Tomcat server that the desktop and browser clients share. Add a server module, registered in the build scripts, holding the pieces every later endpoint builds on: - ServerEngine wires one in-memory market (repositories, ledger, trading pipeline, v3 upload loader) and lives in the servlet context for the webapp's lifetime. Its catalog refuses path-based loading, so events can only arrive through uploaded streams and the server never reads or writes files. - EngineBootstrap builds that engine when the webapp deploys. - CorsFilter answers preflights and echoes the caller's Origin with Allow-Credentials, which the browser client needs to send its session cookie from another origin. With usernames as the only login, echoing any origin exposes nothing a page couldn't get by logging in itself. - /api/health reports that the engine is up. Vendor tomcat-juli 10.1.26 next to the other Tomcat jars. It ships in Tomcat's bin/ rather than lib/, and embedded Tomcat cannot start without it. A test deploys the module into embedded Tomcat, so annotation scanning, the health check and CORS are checked against a real container.
Diffstat (limited to 'server/.project')
-rw-r--r--server/.project29
1 files changed, 29 insertions, 0 deletions
diff --git a/server/.project b/server/.project
new file mode 100644
index 0000000..f807d88
--- /dev/null
+++ b/server/.project
@@ -0,0 +1,29 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<projectDescription>
3 <name>guess-market-server</name>
4 <comment></comment>
5 <projects>
6 <project>guess-market-api</project>
7 <project>guess-market-service</project>
8 </projects>
9 <buildSpec>
10 <buildCommand>
11 <name>org.eclipse.jdt.core.javabuilder</name>
12 <arguments></arguments>
13 </buildCommand>
14 </buildSpec>
15 <natures>
16 <nature>org.eclipse.jdt.core.javanature</nature>
17 </natures>
18 <filteredResources>
19 <filter>
20 <id>1791557442636</id>
21 <name></name>
22 <type>30</type>
23 <matcher>
24 <id>org.eclipse.core.resources.regexFilterMatcher</id>
25 <arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
26 </matcher>
27 </filter>
28 </filteredResources>
29</projectDescription>