# Write a simple application

1) Create work directory such as:

```
webui # Work directory, name it whatever you want
└── apps # Must named `apps`
    └── demo # Application directory 
        ├── icon.png # Icon file
        ├── index.html # Application entry file
        └── index.js # Application description file
```

2) `index.js`:

```js
module.exports = {
    ident: 'com.companyName.demo', // Make sure the ident do not be the same as other.
    name: 'Demo',
    icon: './icon.png',
    version: '0.0.1',
    description: 'A demo application.'
};
```

3) `index.html`

```html
<!DOCTYPE html>
<html>

<head>
    <meta charset='utf-8'/>
    <title>Demo</title>
</head>

<body>
    <div id="time"></div>

    <script src="/ui/sdk.js"></script>
    <script>
        OS.app.ready(); // Required
        OS.std.os.getDate('YYYY-MM-DD HH:mm:ss')
            .then(function(res) {
                document.getElementById('time').textContent = res.date;
            });
    </script>
</body>

</html>
```

4) Add an icon file, such as `icon.png`.

5) Load your applications web start webui:

```
webui -d ~/webui
```
