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 starter templates such as 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 --vdom
The Oracle JET tooling creates the app in the
JET-Virtual-DOM-app
folder 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-app
directory and run the app.npx ojet serve
The 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
y
to exit the Oracle JET tooling batch job.
Next Step
To proceed to the next tutorial in this learning path, click here.
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-03
February 2024
Copyright © 2022, 2024, Oracle and/or its affiliates.