• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# app.js<a name="EN-US_TOPIC_0000001115814806"></a>
2
3You can implement lifecycle logic specific to your application in the  **app.js**  file. Available application lifecycle functions are as follows:
4
5-   **onCreate\(\)**: called when an application is created
6-   **onDestory\(\)**: called when an application is destroyed
7
8In the following example, logs are printed only in the lifecycle functions .
9
10```
11// app.js
12export default {
13  onCreate() {
14    console.info('Application onCreate');
15  },
16  onDestroy() {
17    console.info('Application onDestroy');
18  },
19}
20```
21
22