Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nopi.js

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nopi.js

CLI Tool/Framework for generating Node APIs and Files

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

nopi

Nopi is a CLI Tool / Framework for generating a simple Node API and Files.


Installation

To Install Nopi:

$ npm install nopi.js -g

To see a list of commands:

$ nopi


Project Generation

To Generate a new API:

$ nopi new apiName

When you create a new project, Nopi will run npm install automatically in the created project directory. All you have to do is be patient, it is not frozen.

Once it is done, cd to API and start the server with:

$ npm start

Database Selection


File Generation

To generate a new controller or model file:

$ nopi controller fileName

$ nopi model fileName

Use these commands in the root of your project.

Controllers which are generated should be added to the index.js to connect and route with intended endpoint. Once the controller is setup inside of the index controller, it is connected to your API server.

Models are only setup to be used with Mongoose currently. In the future, other adapters will be added.

On File Creation Specifics:

On file creation, Nopi will look through your working project directory for controller and model folders and create the corresponding file type. If none of these folders exist, Nopi will create the file in the root of your project.

Nopi also creates .nopiPath folder in your project and saves the path of the file type generated. This is to optimize the speed of file creation. By saving this path Nopi does not have to dynamically find the folder again after each generated file.

If your project directory changes at all, delete .nopiPath folder to recache folder paths. .nopiPath folder is added to .gitignore also.

You cannot create files that already exist.

Contribute

If you would like to contribute, it would be greatly appreciated.


For help and more commands:

$ nopi -h | $ nopi -V | $ nopi


Keywords

FAQs

Package last updated on 27 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc