-
-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
example using babel and default exports
- Loading branch information
Carmine DiMascio
committed
Feb 16, 2020
1 parent
fc6d804
commit 284d867
Showing
11 changed files
with
5,034 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"targets": { | ||
"node": "current" | ||
} | ||
} | ||
] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dist | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"ext": "js,json,mjs,yaml,yml" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |
Oops, something went wrong.