forked from apxtri/apxtri
maj
This commit is contained in:
parent
81917cedaf
commit
0a7cd6c12f
@ -45,7 +45,7 @@ All actors will have the same target to respect contracts and are free to leave
|
||||
/adminapx/index_lg.html administration webapp
|
||||
/website/
|
||||
/tribeName/
|
||||
/api/routes Specific web service https://.../api/tribename/routeName/endpoint
|
||||
/apxtri/routes Specific web service https://.../api/tribename/routeName/endpoint
|
||||
/middlewares
|
||||
/models
|
||||
/nginx/tribe_website.conf nginx conf per website
|
||||
@ -107,7 +107,7 @@ You need a domain name, to get a free one [http://ydns.io](http://ydns.io) creat
|
||||
# Into your production machine
|
||||
$ crontab -e
|
||||
# add a line at the end to update your IP in case you have a dynamic WAN IP
|
||||
1,6,11,16,21,26,31,36,41,46,51,56 * * * * sleep 38 ; wget --no-check-certificate -O - https://ydns.io/hosts/update/Tl7FDQAETmQre312edztgsIUy >> /tmp/apxtri_ydns.io.log 2>&1
|
||||
1,6,11,16,21,26,31,36,41,46,51,56 * * * * sleep 38 ; wget --no-check-certificate -O - https://ydns.io/hosts/update/Tl7FDQAETmQre312edztgsIUy >> /tmp/apxtri_ydns.io.log 2>&1
|
||||
$ ip -4 address # to get your (local) LAN IP of your server
|
||||
```
|
||||
|
||||
|
36
apidoc_adminapi.json
Normal file
36
apidoc_adminapi.json
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
"comment": "specific api for tribes conf have to be in conf/apidoc/apidoc_{tribe}.json run: $ tribe=smatchit yarn apidoctribe",
|
||||
"name": "apxtri.be",
|
||||
"version": "1.0.0",
|
||||
"title": "apiDoc for apxtri endpoint",
|
||||
"description": "Core api documentation that manage nation objects (Pagans, Nations, Towns, Blockchain, Tracking, Notifications, Odmdb, Tribes (management), Wwws)",
|
||||
"url": "https://testwall-ants.ndda.fr/api",
|
||||
"outputcoment":"pour rappel l'option output ne fonctionne pas en fichier de config ajouté dans package.json",
|
||||
"output":"../nationchains/tribes/adminapi/www/cdn/apidoc/",
|
||||
"input":[
|
||||
"./middlewares",
|
||||
"./routes"
|
||||
],
|
||||
"order": [
|
||||
"Middlewares",
|
||||
"Odmdb",
|
||||
"Nationchains",
|
||||
"Pagans",
|
||||
"Notifications"
|
||||
],
|
||||
"template": {
|
||||
"forceLanguage": "en",
|
||||
"showRequiredLabels": true,
|
||||
"withCompare": true,
|
||||
"withGenerator": true,
|
||||
"aloneDisplay": false
|
||||
},
|
||||
"header": {
|
||||
"title": "Introduction",
|
||||
"filename": "header.md"
|
||||
},
|
||||
"footer": {
|
||||
"title": "Best practices",
|
||||
"filename": "footer.md"
|
||||
}
|
||||
}
|
@ -42,7 +42,7 @@ All others object are managed by spécifics tribe.
|
||||
/schema/conf.json # list of schema and version
|
||||
/objectname.json # schema title and escription are in english
|
||||
/lg/objectname_lg.json # title and description in lg
|
||||
/tribename/ # same than adminapi for a specific tribe but wit /api instead of /apxtri,
|
||||
/tribename/ # same than adminapi for a specific trib,
|
||||
# we only have 1 node process that manage 1 town that manage many tribes api
|
||||
```
|
||||
|
||||
@ -105,7 +105,7 @@ C - a json multi answer **{status,multimsg:\[{ref,msg,data}\]}**
|
||||
|
||||
Each {ref,msg,data\] work the same way than B
|
||||
|
||||
To show feedback context message in a language lg => get /nationchains/models/{{ref}}\_{{lg}}.json
|
||||
To show feedback context message in a language lg => get /api/adminapi/objects/tplstrings/{{model}}\_{{lg}}.json
|
||||
This contain a json {msg:"mustache template string to render with data"}
|
||||
|
||||
## Accessrights:
|
||||
@ -121,9 +121,9 @@ Each object has an apxaccessrights that is a list of profil and CRUD access per
|
||||
Accessible with https://dns/api/tribename/routes
|
||||
|
||||
```plaintext
|
||||
/tribes/tribename/api/routes
|
||||
/tribes/tribename/api/middlewares
|
||||
/tribes/tribename/api/models
|
||||
/tribes/tribename/apxtri/routes
|
||||
/tribes/tribename/apxtri/middlewares
|
||||
/tribes/tribename/apxtri/models
|
||||
/tribes/tribename/schema
|
||||
/tribes/tribename/schema/lg
|
||||
```
|
||||
|
@ -19,7 +19,7 @@ Towns.create = () => {
|
||||
`${conf.dirapi}/adminapi/www/adminapx/initconf.json`
|
||||
);
|
||||
// Synchronize nationchains/
|
||||
const { updateobjectsfromfreshesttown } = require("./api/models/Nations.js");
|
||||
const { updateobjectsfromfreshesttown } = require("./apxtri/models/Nations.js");
|
||||
updateobjectsfromfreshesttown(initconf.towns, {
|
||||
pagans: "alias_all.json",
|
||||
towns: "townId_all.json",
|
||||
|
@ -22,7 +22,7 @@ see man adduser and file reference call skelet directory to set an env for apxtr
|
||||
accessible by tribename/password
|
||||
then add group group me to phil to allow phil to ate a symlink /dirtown/tribes/tribename => to /home/tribename
|
||||
|
||||
At each reboot run a process to analyse /api/routes and api/models whre only js can be exexuted are safe (only write data into /home/tribename, never outside)
|
||||
At each reboot run a process to analyse /apxtri/routes and api/models whre only js can be exexuted are safe (only write data into /home/tribename, never outside)
|
||||
|
||||
1- Create a user in linux with $ sudo useradd smatchit
|
||||
2 => this create a user:group and a folder smatchit in /home/phil/dirtown/tribes/
|
||||
|
Loading…
x
Reference in New Issue
Block a user