UNPKG
ohana
Version:
latest (1.0.3)
1.0.3
1.0.2
1.0.1
1.0.0
0.3.0
0.2.0
0.1.5
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
A simple server that return fake json data for test
github.com/Allenice/ohana
ohana
/
example
/
mock
/
app2.js
17 lines
(13 loc)
•
264 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
var Mock =
require
(
'mockjs'
); var Server =
require
(
"../../index.js"
); var server = new Server({ parser: Mock.mock, proxy: { urlRoot:
'http://localhost:4000'
,
method
: '
GET
' } })
; server.register([
require
(
'./proxy/index'
) ]); server.start(
4001
);