npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@oracle/create-database-app

v1.3.1

Published

Create an Oracle Database Application from a Template

Downloads

29

Readme

Create Database App

Table of Contents

Overview

Create an Oracle Database Application from a template.

NOTE: The applications generated by this package should not be deployed using privileged database accounts. In turn, Oracle recommends for them to be deployed using the least privileged account possible.

Prerequisites

  • An Oracle Database, either on-prem or an Autonomous Database instance
  • Node.js 18 (Recommendation is to use nvm)

Installation

Install the package globally using npm

npm install -g @oracle/create-database-app

Getting Started

The main application usage is through the @oracle/create-database-app NPM package, which will scaffold an application that will be connected to your Oracle Database.

npm create @oracle/database-app

This will temporarily install the package in your computer and prompt you for details like the name of the application, the template, and the database connection, from which it will create a git folder named as the given application name in your current directory, and install its dependencies.

Next, you will be able to open the project in your favorite IDE or Code Editor and read the provided documentation to get started creating a database application using your favorite framework. We ship configuration files with recommended settings and extensions for Visual Studio Code.

Templates

The package offers the following templates, some of them connect to the database using the oracledb database driver and other use Oracle REST Data Services endpoints:

  • node-vanilla: A starter template that uses Node.js, vanilla JavaScript, HTML and CSS. It is built by vite.
  • node-jet: A starter template that uses Node.js and Oracle JET. It is built using the ojet-cli.
  • node-react: A starter template that uses Node.js and React. It is built by vite.
  • node-vue: A starter template that uses Node.js and Vue.js. It is built by vite.
  • node-angular: A starter template that uses Node.js and Angular. It is built by Angular CLI. (New in v1.2.0)
  • node-react-todo: A simple task manager template that uses Node.js and React. It demonstrates the use of the database for Create, Read, Update and Delete (CRUD) operations. It is built by vite.
  • ords-remix-jwt-sample: A full stack Concert Application made with Remix that showcases the Oracle REST Data Services functionalities. Some extra configuration is required, learn more about it in the ords-remix-jwt-sample Getting Started Guide.

Each of the templates include documentation for you to get started with them, as well as NPM scripts for you to use right after generating the application.

Options

You can provide the following options directly to the command:

Database Environment

When an application is generated, you'll find a .env file with details regarding the connection to the database used in the application.

# Database user
DB_USER=<my-username>
# Database password
DB_PASSWORD=<my-password>
...

Note: For the ords-remix-jwt-sample is expected that you will configurate your own .env file folowing the ords-remix-jwt-sample Getting Started Guide.

Examples

Usage

The simplest example on how to use the generator is via:

npm create @oracle/database-app

This opens an interactive prompt where information regarding the application and connection details can be provided.

Simple React app

npm create @oracle/database-app -- "my-react-app" --template "node-react"

React todo app

You can generate an example of a fully functional application. The example below creates an app named my-todo with the node-react-todo template.

npm create @oracle/database-app -- "my-todo" --template "node-react-todo"

Application without interactive prompts

Any combination of parameters defined via the interactive prompt can be defined using a flag as part of the command.*

npm create @oracle/database-app -- "my-app" \
    --template "node-react" \
    --connection-type "walletPath" \
    --db-username "<my-db-user>" \
    --wallet-path "<path>.zip"

The example above shows how to connect to an Autonomous Database using a wallet.

Note: passwords still need to be provided using the prompt.

Contributing

This project welcomes contributions from the community. Before submitting a pull request, please review our contribution guide

Security

Please consult the security guide for our responsible security vulnerability disclosure process

License

Copyright (c) 2024 Oracle and/or its affiliates.

Released under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl/.