# Expo App
<subtitle>Expo web app running in a sandbox using Node.js. </subtitle>

Basic Expo app.

> Once the sandbox is in place, the development server will be running on port 8081.

## Template definition

```python
# template.py
from ucloud_sandbox import Template, wait_for_url

template = (
    Template()
    .from_node_image()
    .set_workdir("/home/user/expo-app")
    .run_cmd("npx create-expo-app@latest . --yes")
    .run_cmd("mv /home/user/expo-app/* /home/user/ && rm -rf /home/user/expo-app")
    .set_workdir("/home/user")
    .set_start_cmd("npx expo start", wait_for_url('http://localhost:8081'))
)
```

## Build template

```python
# build.py
from ucloud_sandbox import Template, default_build_logger
from .template import template as expoTemplate

Template.build(expoTemplate, 'expo-app',
    cpu_count=4,
    memory_mb=8192,
    on_build_logs=default_build_logger(),
)
```
