🐳 Switched to the TS template with the correct docker-compose config
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,minimal-ui">
|
||||
<title>threetwo-import-service - Moleculer Microservices Project</title>
|
||||
<title>threetwo-library-service - Moleculer Microservices Project</title>
|
||||
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700" rel="stylesheet">
|
||||
<link href="https://unpkg.com/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
|
||||
<link rel="shortcut icon" type="image/png" href="https://moleculer.services/icon/favicon-16x16.png"/>
|
||||
@@ -519,7 +519,6 @@
|
||||
menu: [
|
||||
{ id: "home", caption: "Home" },
|
||||
{ id: "greeter", caption: "Greeter service" },
|
||||
{ id: "products", caption: "Products service" },
|
||||
{ id: "nodes", caption: "Nodes" },
|
||||
{ id: "services", caption: "Services" }
|
||||
],
|
||||
@@ -532,48 +531,11 @@
|
||||
{ id: "welcome", action: "greeter.welcome", rest: "/api/greeter/welcome", fields: [
|
||||
{ field: "name", label: "Name", type: "text", paramType: "param", model: "welcomeName" }
|
||||
], response: null, status: null, duration: null }
|
||||
],
|
||||
products: [
|
||||
{ id: "list", action: "products.list", rest: "/api/products/", response: null, status: null, duration: null, afterResponse: response => !this.fields.productID && (this.fields.productID = response.rows[0]._id) },
|
||||
|
||||
{ id: "create", action: "products.create", rest: "/api/products/", method: "POST", fields: [
|
||||
{ field: "name", label: "Name", type: "text", paramType: "body", model: "productName" },
|
||||
{ field: "price", label: "Price", type: "number", paramType: "body", model: "productPrice" },
|
||||
], response: null, status: null, duration: null, afterResponse: response => this.fields.productID = response._id },
|
||||
|
||||
{ id: "get", action: "products.get", rest: "/api/products/:id", method: "GET", fields: [
|
||||
{ field: "id", label: "ID", type: "text", paramType: "url", model: "productID" }
|
||||
], response: null, status: null, duration: null },
|
||||
|
||||
{ id: "update", action: "products.update", rest: "/api/products/:id", method: "PUT", fields: [
|
||||
{ field: "id", label: "ID", type: "text", paramType: "url", model: "productID" },
|
||||
{ field: "name", label: "Name", type: "text", paramType: "body", model: "productName" },
|
||||
{ field: "price", label: "Price", type: "number", paramType: "body", model: "productPrice" },
|
||||
], response: null, status: null, duration: null },
|
||||
|
||||
{ id: "increase", action: "products.increaseQuantity", rest: "/api/products/:id/quantity/increase", method: "PUT", fields: [
|
||||
{ field: "id", label: "ID", type: "text", paramType: "url", model: "productID" },
|
||||
{ field: "value", label: "Value", type: "number", paramType: "body", model: "productValue" },
|
||||
], response: null, status: null, duration: null },
|
||||
|
||||
{ id: "decrease", action: "products.decreaseQuantity", rest: "/api/products/:id/quantity/decrease", method: "PUT", fields: [
|
||||
{ field: "id", label: "ID", type: "text", paramType: "url", model: "productID" },
|
||||
{ field: "value", label: "Value", type: "number", paramType: "body", model: "productValue" },
|
||||
], response: null, status: null, duration: null },
|
||||
|
||||
{ id: "delete", action: "products.delete", rest: "/api/products/:id", method: "DELETE", fields: [
|
||||
{ field: "id", label: "ID", type: "text", paramType: "url", model: "productID" }
|
||||
], response: null, status: null, duration: null },
|
||||
|
||||
]
|
||||
},
|
||||
|
||||
fields: {
|
||||
welcomeName: "John",
|
||||
productID: null,
|
||||
productName: "Xiamoi Mi 9T",
|
||||
productPrice: 299,
|
||||
productValue: 1
|
||||
welcomeName: "John"
|
||||
},
|
||||
|
||||
broker: null,
|
||||
|
||||
Reference in New Issue
Block a user