deploy: 214e1a3a53
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Server Types | Pixel Services Docs</title>
|
||||
<meta name="description" content="Documentation for all public Pixel Services projects.">
|
||||
<meta name="description" content="A VitePress site">
|
||||
<meta name="generator" content="VitePress v1.5.0">
|
||||
<link rel="preload stylesheet" href="/assets/style.DKcHOilP.css" as="style">
|
||||
<link rel="preload stylesheet" href="/vp-icons.css" as="style">
|
||||
@@ -58,7 +58,7 @@
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // Other routes and configurations</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>The <code>InternalFlashServer</code> is a <strong>pre-configured instance</strong> of <code>FlashServer</code> that is managed internally by the library. Under the hood, it is instantiated as:</p><div class="language-java vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">java</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">new</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> FlashServer</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Internal"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span></code></pre></div><p>This means:</p><ul><li>Its <strong>name</strong> is set to <code>"Internal"</code> for logging and internal management purposes.</li><li>It serves as the default server used by the library, which is automatically initialized when the library is loaded.</li></ul><p>Both the <code>InternalFlashServer</code> and any user-created <code>FlashServer</code> instances are of the same type (<code>FlashServer</code>). However, if you want to create and manage your own server instance, you must provide a <strong>name</strong> during initialization, e.g.:</p><p>FlashServer server = new FlashServer("My Server Instance");</p><h2 id="which-server-type-should-you-use" tabindex="-1">Which Server Type Should You Use? <a class="header-anchor" href="#which-server-type-should-you-use" aria-label="Permalink to "Which Server Type Should You Use?""></a></h2><p>It all depends on your use case. If you only need one server instance and want to keep your code concise, you can use the internal server. However, if your application needs to handle multiple server instances each with different ports and configurations, you should use <code>FlashServer</code> instances.</p><p>Example use cases for each server type:</p><ul><li>Internal Server: Simple Backend for a webapp.</li><li>Server Instance: Applications where flexible deployment and scalability are required.</li></ul></div></div></main><footer class="VPDocFooter" data-v-e6f2a212 data-v-1bcd8184><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-1bcd8184><span class="visually-hidden" id="doc-footer-aria-label" data-v-1bcd8184>Pager</span><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link prev" href="/flash/installation.html" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Previous page</span><span class="title" data-v-1bcd8184>Installation</span><!--]--></a></div><div class="pager" data-v-1bcd8184><!----></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"flash_index.md\":\"MswL21Aa\",\"flash_installation.md\":\"DXFS8nXw\",\"flash_server-types.md\":\"CVvcqD7R\",\"index.md\":\"C0i0eblV\",\"mobot_index.md\":\"DwPhSoGB\",\"serverlibraries_index.md\":\"Cck5lY4m\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Pixel Services Docs\",\"description\":\"Documentation for all public Pixel Services projects.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"https://static.pixel-services.com/static/assets/pservices_logo.png\",\"sidebar\":{\"/flash/\":[{\"text\":\"Flash Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/flash\"},{\"text\":\"Installation\",\"link\":\"/flash/installation\"},{\"text\":\"Server Types\",\"link\":\"/flash/server-types\"}]}],\"/mobot/\":[{\"text\":\"MoBot Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/mobot\"}]}],\"/serverlibraries/\":[{\"text\":\"ServerLibraries Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/serverlibraries\"}]}]}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"flash_index.md\":\"MswL21Aa\",\"flash_installation.md\":\"DXFS8nXw\",\"flash_server-types.md\":\"CVvcqD7R\",\"index.md\":\"C0i0eblV\",\"mobot_index.md\":\"DwPhSoGB\",\"serverlibraries_index.md\":\"Cck5lY4m\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Pixel Services Docs\",\"description\":\"A VitePress site\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"https://static.pixel-services.com/static/assets/pservices_logo.png\",\"sidebar\":{\"/flash/\":[{\"text\":\"Flash Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/flash\"},{\"text\":\"Installation\",\"link\":\"/flash/installation\"},{\"text\":\"Server Types\",\"link\":\"/flash/server-types\"}]}],\"/mobot/\":[{\"text\":\"MoBot Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/mobot\"}]}],\"/serverlibraries/\":[{\"text\":\"ServerLibraries Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/serverlibraries\"}]}]}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user