UNPKG
micdrop
Version:
latest (1.1.3)
1.1.3
1.1.2
1.1.1
1.1.0
1.0.0
0.9.3
0.9.2
0.9.1
0.9.0
0.2.1
0.2.0
0.1.0
MicroService baseline using Express
github.com/kentprimrose/micdrop
kentprimrose/micdrop
micdrop
/
example
/
handlers
/
person_handler.js
16 lines
(12 loc)
•
242 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const
storage =
require
(
'memrest'
)();
module
.
exports
= {
getOne
:
(
id, next
) =>
{
next
(storage.
get
(id)); },
post
:
(
item, next
) =>
{
next
(storage.
post
(item)); },
delete
:
(
id, next
) =>
{
next
(storage.
delete
(id)); } };