Skip to content

Commit

Permalink
example using babel and default exports
Browse files Browse the repository at this point in the history
  • Loading branch information
Carmine DiMascio committed Feb 16, 2020
1 parent fc6d804 commit 284d867
Show file tree
Hide file tree
Showing 11 changed files with 5,034 additions and 0 deletions.
12 changes: 12 additions & 0 deletions examples/3-eov-operations-babel/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
]
]
}
2 changes: 2 additions & 0 deletions examples/3-eov-operations-babel/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
node_modules
3 changes: 3 additions & 0 deletions examples/3-eov-operations-babel/.nodemonrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ext": "js,json,mjs,yaml,yml"
}
28 changes: 28 additions & 0 deletions examples/3-eov-operations-babel/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# example

example using express-openapi-validator with auto-wiring via `operationHandlers`

## Install

```shell
npm i && npm run deps
```

## Run

From this `3-eov-operations-babel` directory, run:

```shell
npm run dev
```

## Try

```shell
## call ping
curl http://localhost:3000/v1/ping

## call pets
## the call below should return 400 since it requires additional parameters
curl http://localhost:3000/v1/pets
```
Loading

0 comments on commit 284d867

Please sign in to comment.