新增部分测试
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
routes:
|
routes:
|
||||||
- path: "api/v1/**"
|
- path: "api/dev/**"
|
||||||
qjs:
|
qjs:
|
||||||
exec: "index.js"
|
exec: "index.js"
|
||||||
debug: true
|
debug: true
|
||||||
|
- path: "api/prod/**"
|
||||||
|
qjs:
|
||||||
|
exec: "json.js"
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
<meta name="viewport"
|
<meta name="viewport"
|
||||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
<title>Document</title>
|
<title>Quickjs 概念验证</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
response.write("hello world")
|
response.write("hello world")
|
||||||
console.log("hello world")
|
console.log("hello world")
|
||||||
console.log(req.methaaod)
|
console.log(req.methaaod)
|
||||||
function aaa(){
|
function testError(){
|
||||||
throw Error("Method not implemented")
|
throw Error("Method not implemented")
|
||||||
}
|
}
|
||||||
aaa()
|
testError()
|
||||||
4
examples/QuickJS/json.js
Normal file
4
examples/QuickJS/json.js
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
resp.setHeader("content-type", "application/json");
|
||||||
|
resp.write(JSON.stringify({
|
||||||
|
'method': req.method,
|
||||||
|
}))
|
||||||
Reference in New Issue
Block a user