~skiqqy/apiCosmic

Backend for the cosmic project
794e8e70 — Stephen Cochrane 1 year, 4 months ago
Updated README
c0dfae40 — Stephen Cochrane 1 year, 4 months ago
Very good prog on base, have todosql integrated nicely with axes
adadc266 — Stephen Cochrane 1 year, 4 months ago
Updated CI file

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~skiqqy/apiCosmic
read/write
git@git.sr.ht:~skiqqy/apiCosmic

You can also use your local clone with git send-email.

License:

#apiCosmic

Backend for cosmic

#Modules

The core concept around the cosmic API is the module. At a high level, a Module is a class that an abstract java project/program may implement, then this project may be added to cosmics classpath, then at runtime cosmic will detect And serve the module.

A module is essentually a rest API entry point to some abstract java application. To create a module, the application must do two things.

Annotate the module with the @Module annotation. This allows cosmic to detect and load the module. The other is the module must extend and implement a ModuleConf class. This conf is then pass to the single constructor used to instantiate the Module.

The config should then be given to cosmic so that it may instantaite the module at start up.

I have left out alot of detail to try condense this, it is best to read the source code directly to see how this happens (I will soon have a demo out showing this in action).

#Installing

$ mvn install

#Usage

$ java -cp target/lib/*:target/api-<VERSION>.jar xyz.skiqqy.cosmic.Main # Starts the spring app

#License

License: