Create an Oracle JET virtual DOM app by using a starter template
Introduction
This tutorial shows you how to create an Oracle JavaScript Extension Toolkit (Oracle JET) virtual DOM app that uses a basic starter template. You’ll use the npx Node.js package runner to access the create command provided by the Oracle JET command-line interface package.
Developing virtual DOM apps with Oracle JET is simple and efficient. To help you get started, Oracle JET provides the basic starter template that adds preconfigured pages and a number of components.
You can create and run the Oracle JET virtual DOM app from a terminal window by using the Oracle JET tooling that is included with the Oracle JET command-line interface package. You can also see command output, such as app errors and warnings, in the terminal window.
Objectives
In this tutorial, you will create an Oracle JET virtual DOM app that uses the basic template and run it in a local web browser.
Prerequisites
A development environment set up to create Oracle JET virtual DOM apps that includes an installation of Node.js
Task 1: Get Started with the basic Starter Template
-
In your file system, in the location where you want the Oracle JET virtual DOM app to reside, open a terminal window and create the app.
npx @oracle/ojet-cli create JET-Virtual-DOM-app --template=basic --vdomThe Oracle JET tooling creates the app in the
JET-Virtual-DOM-appfolder and displays progress messages until it finishes. -
Wait for confirmation.
Your app is ready! Change to your new app directory 'JET-Virtual-DOM-app' and try 'ojet build' and 'ojet serve'.
Task 2: Run the Virtual DOM App
-
In the terminal window, change to the
JET-Virtual-DOM-appdirectory and run the app.npx ojet serveThe Oracle JET tooling runs your virtual DOM app in a local web browser where you can perform testing and debugging.
- Close the browser window.
- In the terminal window, press Ctrl+C, and, if prompted, enter
yto exit the Oracle JET tooling batch job.
Next Step
Proceed to the next tutorial in this module.
This tutorial is part of the module Your First Oracle JET Virtual DOM App.
- Create an Oracle JET Virtual DOM App by Using a Starter Template
- Add Components to an Oracle JET Virtual DOM App
- Data Bind a Component in an Oracle JET Virtual DOM App
- Debug an Oracle JET Virtual DOM App
- Add Unit Tests to an Oracle JET Virtual DOM App
- Prepare to Deploy an Oracle JET Virtual DOM App
You can return to the virtual DOM learning path’s main page to access all the modules on building virtual DOM apps.
More Learning Resources
Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.
For product documentation, visit Oracle Help Center.
Create an Oracle JET virtual DOM app by using a starter template
F60897-04