Skip to content

Commit

Permalink
fix: make route and methods questions required; update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
blewisio committed Apr 10, 2020
1 parent 15d25a4 commit 5db4b7e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const questions = [{
name: 'route',
type: 'input',
message: 'What is the new endpoint\'s path?',
validate: x => !!x,
}, {
name: 'methods',
type: 'checkbox',
Expand All @@ -20,6 +21,7 @@ const questions = [{
'PATCH',
'DELETE',
],
validate: x => x.length !== 0,
}, {
name: 'isPrivate',
type: 'confirm',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "generate-serverless-endpoints",
"version": "1.0.0",
"version": "1.0.1",
"description": "Stub serverless API endpoints via command-line questionnaire",
"bin": {
"generate-serverless-endpoints": "index.js",
Expand Down
8 changes: 2 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
# Generate Serverless Endpoints

## Installation

```sh
npm install --global generate-serverless-endpoints
```
Generate boilerplate definitions for serverless API endpoints by answering questions.

## Usage

At the command line:
```sh
$ generate-endpoints
$ npx generate-serverless-endpoints
```

Example prompts:
Expand Down

0 comments on commit 5db4b7e

Please sign in to comment.