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

owc-cli

v2.0.10

Published

owc cli to generate project and files

Downloads

6

Readme

owc-cli 2.0.10

This is command line interface for owc mvc framework to generate project, modules, controllers, models and so on.

owc is a lightweight mvc framework for building aws lambda web services based on express.

Prerequisites:

  1. You must be familiar with aws-sdk and have knowledge about various aws services.

  2. This lambda web service is deployed with sam command. You need to understand yaml file formats in order to deploy to aws.

Release Notes

2.0.10 - Changed elasticsearch model template to comply with package owc-elasticsearch

2.0.9 - Added ability to create dynamodb models

Installation

Just run below command to install this command line interface globally

          sudo npm i -g owc-cli

Usage

1. Command Overview:

       owc-cli -t <type> -n <name> [options]

options includes:

-d --dest  This is used to specify the destination where you want to create project
-r --root  This is used to provide the root dir of your project when you create modules, models, etc.
-s --schema This is to specify the schema/database your table is in when creating models
-b --database The name of the database connection you define in config.json file
-p --parent This is used to define the parent class of the model you want to create
-l --table The table you want to create model for
-a --all This is to tell the command whether you want to create models for all the tables in a given schema when you create model class for the schema
-f --prefix prefix for the tables, for example all tables start with prefix "tbl_"
-e --elasticsearch the name of the elasticsearch service in config.json file
-m --module the name of the module under which the controller will be created

2. Create a new project

Below command will create a new project "owc-project":

owc-cli -t project -n owc-project -d /home/ubuntu/

3. Create a new module

owc-cli -t module -n user -r /home/ubuntu/owc-project

4. Create a new model class for schema

Please be reminded that the names are case sensitive

owc-cli -r /home/ubuntu/owc-project -t schema -n User -s user -b db -a true -f tbl_ -e elasticsearch

If you have "-a true", models will be created for all the tables in schema "user".

If you have "-e elasticsearch", elasticsearch models will be created for all tables as well.

5. Create a new model class for table

owc-cli -r /home/ubuntu/owc-project -t model -n Tenant -s user -b db -p User -l tbl_tenant -e elasticsearch

6. Create a controller under a given module

owc-cli.js -t controller -m user -n profile -r /home/ubuntu/owc-project

This will create ProfileController under module user

7. Create a controller outside modules

owc-cli.js -t controller -n profile -r /home/ubuntu/owc-project

8. Create a dynamodb model

owc-cli -t dynamodb -n User -r /home/ubuntu/owc-project -l tbl_user