Socket
Socket
Sign inDemoInstall

generator-hapijs-api

Package Overview
Dependencies
457
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    generator-hapijs-api

Scaffold out a REST API with hapijs.


Version published
Maintainers
1
Install size
49.6 MB
Created

Readme

Source

generator-hapijs-api

Yeoman generator for creating an API with Hapi.js

Installation

npm install -g yo

npm install -g generator-hapijs-api

Setup

cd /path/to/project

yo hapijs-api

This will create the basic structure of a Hapi.js project.

project
│───.aws
│   │   config
│───.elasticbeanstalk
│   │   config.yml
└───.ebextensions
│   └──nginx
│       └───conf.d
│   		    │   cors.conf
│	  .gitignore
│	  .jshintrc
│   circle.yml
│───coverage
│   │   .gitkeep
│	  env.js
└───fixtures
│   │   development.js
│   │   production.js
│   │   testing.js
│	  index.js
│───lib
│   │   .gitkeep
└───node_modules
│	  package.json
│   README.md
└───routes
│   │   .gitkeep
└───schemas
│   │   .gitkeep
└───test
│   │   test.js
│   └───routes
│       │   .gitkeep

Actions

yo hapijs-api:model

This will create 3 files, a route, schema and test file for your model with predefined CRUD code.

It will also make the correct imports in the necessary files.

Keywords

FAQs

Last updated on 14 Dec 2016

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc