|
1 | 1 | --- |
2 | 2 | title: WebContainer |
3 | | -description: Manage multiple development server instances with seamless port switching and real-time preview management for complex applications. |
| 3 | +description: Switch between different parts of your app while it's running |
4 | 4 | --- |
5 | 5 |
|
6 | | -Manage multiple development server instances running in WebContainer environments. The port dropdown provides seamless switching between different preview instances and server configurations. |
| 6 | +WebContainer lets you run your app and see it working. If your app has multiple parts (like a website and a backend), you can easily switch between them. |
7 | 7 |
|
8 | | -## Overview |
| 8 | +## What is WebContainer? |
9 | 9 |
|
10 | | -When running multiple development servers or microservices, the WebContainer Preview Management system allows you to switch between different application instances with a simple dropdown interface. |
| 10 | +Think of WebContainer like a mini computer inside CodinIT. It runs your code and shows you what it looks like, just like opening a website in your browser. |
11 | 11 |
|
12 | 12 | <CardGroup cols={3}> |
13 | | - <Card title="Port Selection" icon="hash"> |
14 | | - Quick switching between server instances |
| 13 | + <Card title="Switch Views" icon="hash"> |
| 14 | + Jump between different parts of your app |
15 | 15 | </Card> |
16 | | - <Card title="Instance Management" icon="server"> |
17 | | - Multiple preview environments |
| 16 | + <Card title="Multiple Parts" icon="server"> |
| 17 | + Run several things at once |
18 | 18 | </Card> |
19 | | - <Card title="Status Indicators" icon="activity"> |
20 | | - Active preview identification |
| 19 | + <Card title="See What's Active" icon="activity"> |
| 20 | + Know which part you're looking at |
21 | 21 | </Card> |
22 | 22 | </CardGroup> |
23 | 23 |
|
24 | | -## Preview Management |
| 24 | +## How to Use It |
25 | 25 |
|
26 | | -<AccordionGroup> |
27 | | - <Accordion title="Port Organization" icon="list-ordered"> |
| 26 | +### Switching Between Parts |
28 | 27 |
|
29 | | - ### Server Instance Selection |
| 28 | +When your app is running, you might see different "ports" (think of them as different doors to your app). You can click a dropdown to switch between them. |
30 | 29 |
|
31 | | - Organized access to all running preview instances: |
32 | | - - **Port-based sorting** - Numerical ordering of available ports |
33 | | - - **Active indication** - Clear highlighting of current preview |
34 | | - - **Quick switching** - One-click navigation between instances |
35 | | - - **Instance persistence** - Maintains selection across sessions |
| 30 | +- Click the port number to see all available parts |
| 31 | +- Select the one you want to view |
| 32 | +- Your preview updates instantly |
36 | 33 |
|
37 | | - </Accordion> |
| 34 | +### When You Need Multiple Parts |
38 | 35 |
|
39 | | - <Accordion title="Multi-Server Support" icon="network"> |
| 36 | +Some apps have different pieces that work together: |
40 | 37 |
|
41 | | - ### Complex Application Management |
| 38 | +- **Website** - What users see and click on |
| 39 | +- **Backend** - The part that handles data and logic |
| 40 | +- **Tools** - Extra helpers for testing or building |
42 | 41 |
|
43 | | - Handle applications with multiple server components: |
44 | | - - **Frontend servers** - Main application interfaces |
45 | | - - **API servers** - Backend service endpoints |
46 | | - - **Development tools** - Additional development servers |
47 | | - - **Microservices** - Individual service previews |
| 42 | +You can view each part separately to make sure everything works correctly. |
48 | 43 |
|
49 | | - </Accordion> |
| 44 | +### Navigating Your App |
50 | 45 |
|
51 | | - <Accordion title="Navigation Integration" icon="link"> |
52 | | - |
53 | | - ### Address Bar Integration |
54 | | - |
55 | | - Seamlessly integrated with preview navigation: |
56 | | - - **URL path support** - Navigate within selected instance |
57 | | - - **Port preservation** - Maintains port context during navigation |
58 | | - - **Reload functionality** - Refresh current preview instance |
59 | | - - **External access** - Open previews in new tabs/windows |
60 | | - |
61 | | - </Accordion> |
62 | | -</AccordionGroup> |
63 | | - |
64 | | -## Usage Scenarios |
65 | | - |
66 | | -<BadgeGroup> |
67 | | - <Badge variant="secondary">Full-Stack Apps</Badge> |
68 | | - <Badge variant="secondary">Microservices</Badge> |
69 | | - <Badge variant="secondary">Multi-Tenant Apps</Badge> |
70 | | - <Badge variant="secondary">Development Tools</Badge> |
71 | | -</BadgeGroup> |
72 | | - |
73 | | -### Common Use Cases |
74 | | - |
75 | | -- **Full-stack applications** - Frontend and backend servers |
76 | | -- **Microservice architectures** - Multiple service endpoints |
77 | | -- **Development tooling** - Build tools, testing servers |
78 | | -- **Multi-environment** - Different configurations |
| 46 | +Once you pick a part to view: |
| 47 | +- Type URLs in the address bar to visit different pages |
| 48 | +- Click the refresh button to reload |
| 49 | +- Open in a new tab to see it in your regular browser |
79 | 50 |
|
80 | 51 | <Callout type="info"> |
81 | | - **Port Management**: The port dropdown automatically detects and lists all available WebContainer preview instances, |
82 | | - making it easy to switch between different parts of your application during development. |
| 52 | + **Easy Switching**: CodinIT automatically finds all the running parts of your app. Just pick the one you want to see from the dropdown menu. |
83 | 53 | </Callout> |
0 commit comments