Open hthetiot opened 6 years ago
Know issue with missing id|subject|text property from server.
Will try to fix main.mjson
using montage twitter previous technic, i wanted to finish other scaffolding first.
See:
Expected server result
{
"kafka": {
"prototype": "logic/model/kafka-model[Kafka]",
"values": {
"id": 42,
"subject": "You've got mail",
"text": "Hello World!",
"identifier": null
}
},
"root": {
"value": [
{"@": "kafka"}
]
}
}
Per conversation with @hthetiot
create:service
should work like create:component
when called from inside an application, meaning the logic should be something like the following
Consider the following command
minit create:service -n foo-service
If current working directory is not an application
middleware.js
, express.js
, data/main.mjson
to applicationlogic/service/foo-service.js
, logic/model/foo.js
, data/descriptors/foo.mjson
, data/foo-service.mjson
to applicationfoo-service.mjson
in main.mjson
(if not added in step 1)If current working directory is an application, but does not have stack
middleware.js
, express.js
, data/main.mjson
to applicationlogic/service/foo-service.js
, logic/model/foo.js
, data/descriptors/foo.mjson
, data/foo-service.mjson
to applicationfoo-service.mjson
in main.mjson
If current working directory is an application and has stack
logic/service/foo-service.js
, logic/model/foo.js
, data/descriptors/foo.mjson
, data/foo-service.mjson
to applicationfoo-service.mjson
in main.mjson
This looks interesting, but I think you were hoping to mention a different Harold.
I thought we had talked about creating a root "server" folder in the project, where all assets that are server side only would live
Todo
Overview
index.js (express.js or joey.js)
Init transport and setup middleware
middleware.js
Interface transport and main-service query dispatch
logic/service/name-service.js
Resolve query and return raw data for response
Quick Testing
minit-service.sh
Testing
Client
Server
Preview