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

sails-oracledb-sp-example

v0.2.1

Published

a Sails application

Downloads

2

Readme

sails-oracledb-sp-example

About

Example sails project using the sails-oracledb-sp adapter

The current version exposes the Oracle HR Employee table via a REST API and websockets. It includes an Angular UI.

#Installation The setup procedure relies on Oracle's VM.

install VirtualBox Download and install Oracle VM VirtualBox on your host system

##Download the Oracle 12c VM The Oracle 12c VM is provided in an Open Virtual Appliance (OVA) file. An OVA is essentially an archive that includes a disk image and other supporting files that are suitable to be imported into VirtualBox as a VM. The VM provided by this OVA includes Oracle Linux 7 and Oracle Database 12c Release 1 Enterprise Edition.

Download the Oracle 12c OVA, which is the Oracle DB Developer VM. Launch it by double clicking it and then import it into VirtualBox.

After the VM is launched then it needs a bit of configuration.

Enable the Oracle 12c's VM's bidirectional clipboard.

In the VM's menu: Devices->shared clipboard->bidirectional.

Set the VM's memory for 3GB. Set the VM's memory for 3GB.

In the VM's menu: Machine->settings->system and configure for 3GB of memory.

Database Information:

  • Oracle SID : cdb1
  • Pluggable DB : orcl
  • ALL PASSWORDS ARE : oracle
  • The Linux Username and password is oracle.

Install Node

$sudo su -
# cd Downloads
# wget https://nodejs.org/dist/v0.12.7/node-v0.12.7-linux-x64.tar.gz
# tar xzf node-v0.12.7-linux-x64.tar.gz
# cd node-v0.12.7-linux-x64

Node.js is installed in /usr/local directory. The following command copies the files to the correct sub-directotories in /usr/local:

#for dir in bin include lib share; do cp -par ${dir}/* /usr/local/${dir}/; done

To verify version of node and npm, type:

#node --version
v0.12.7
#npm --version
3.3.8

Now install npm

#npm install -g npm

##Install the Oracle Instant Client 'Basic' and 'SDK' RPMs The Oracle VM comes with FireFox preinstalled.

Download both the Oracle Instant Client 'Basic' and Oracle Instant Client 'SDK' RPMs

Download Oracle Instant Client 'Basic' and Oracle Instant Client 'SDK' RPMs

After the download has completed then copy the downloaded rpms to /home/oracle/rpms and then install the packages as root

$mkdir /home/oracle/rpms
$mv /home/oracle/Downloads/*.rpm /home/oracle/rpms
$sudo su -
#cd /home/oracle/rpms
#rpm -ivh oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm
#rpm -ivh oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm
#exit

Add the following lines to /home/oracle/.bashrc:

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=/opt/node-v4.1.0-linux-x64/bin:$PATH

##Install git

sudo su -
#yum install git
exit

Installation

$ git clone https://github.com/nethoncho/sails-oracledb-sp-example.git
$ cd sails-oracledb-sp-example
$ npm install
$ bower install

Configuration

Edit the oraclehr adapter in the config/connections.js file to match your needs

module.exports.connections = {
  oraclehr: {
    adapter: 'oracle-sp',
    user: 'scott',
    password: 'tiger',
    package: 'HR',
    cursorName: 'DETAILS',
    connectString: 'localhost/orcl'
  }
};

Apply the stored procedures to the HR schema in db/

$ cd db

The order is important

sqlplus "scott/tiger@localhost/orcl" < create_pkg_hr-child.pls
sqlplus "scott/tiger@localhost/orcl" < create_pkgbdy_hr-child.plb
sqlplus "scott/tiger@localhost/orcl" < create_pkg_hr.pls
sqlplus "scott/tiger@localhost/orcl" < create_pkgbdy_hr.plb
sqlplus "scott/tiger@localhost/orcl" < create_type_retcodes.sql
$ cd ..

Run the application

launch Sails:

$ cd ~/sails-oracledb-sp-example
$ sails lift

Point your browser to http://localhost:1337/#/employees to start UI

License

MIT © 2015