Papiea, pronounced like the fruit, is an Intent engine based on perscriptions or recipes for handling differences between intended state and real world state.
Please see Papiea's design document
Since papiea consists of multiple package you need to build them all separately or use a set of commands to build them all
-
In the project root install all dependencies
npm run install-all
. -
In the project root build all packages
npm run build-all
.
Papiea-Engine is the main component that serves web requests and integrates intentful engine with entity information stores in a database. Make sure that you have Docker and Docker-compose since they are required to run Papiea-Engine
-
In the project root cd into papiea engine package
cd papiea-engine
-
To start a container
docker-compose up -d
Papiea-Engine will now be running on port 3000
inside the container and will use port 3333
externally
To stop a container
docker-compose stop
Instead of using usual docker-compose up
in papiea-engine dir, use docker-compose -f docker-compose-debug.yml up
to enable hot-reload and debugger listening on port 9229
See Attaching to node js using VS Code
See Attaching to node js using Intellij
A set of these variables might be used to tweak the default papiea-engine configuration
MONGO_HOST
- mongo host (defaultmongo
)MONGO_PORT
- mongo port (default27017
)PAPIEA_PUBLIC_URL
- external papiea address (default"http://localhost:3000"
)HOT_RELOAD
- use nodemon to autoreload papiea on code changes (defaultfalse
)DEBUG_LEVEL
- log level for morgan logging (defaultcommon
)PAPIEA_ADMIN_S2S_KEY
- papiea admin's s2s key
For now this clojurescript library is embedded, but it may end up in a different repository and will be exposed as a regular npm package which will be imported through npm. Until this happens, here are the instructions for developing this library:
-
Make sure
leiningen
is installed (follow [leiningen installation]https://github.com/technomancy/leiningen#installation) -
To use live repl with clojurescript do the following:
cd papiea-lib-clj lein repl
and inside the repl type:
(require 'cljs.repl.nashorn) (cider.piggieback/cljs-repl (cljs.repl.nashorn/repl-env))
Then go to emacs with cider installed ([Cider Installation]https://github.com/clojure-emacs/cider#installation), do
M+x cider-connect-cljs
, select the host where the repl is running (usually localhost, but can be run anywhere. Use.ssh/config
to name that host), then selectnode
as the running environment and you should have a repl. Debugging is not yet working in cljs, but I simply use regular clojure if I need to live debug for now.
Copyright (C) 2018 Nutanix
The code in the public repositories is licensed under the Apache license.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
[Apache License]http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.