apxc_log_engine_getstarted

this nodejs script it's a simple rest app engine for get a Product to integrate a APXC Log Engine

https://github.com/apxc/apxc_log_engine_getstarted

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.0%) to scientific vocabulary
Last synced: 8 months ago · JSON representation ·

Repository

this nodejs script it's a simple rest app engine for get a Product to integrate a APXC Log Engine

Basic Info
  • Host: GitHub
  • Owner: APXc
  • License: mpl-2.0
  • Language: JavaScript
  • Default Branch: master
  • Size: 229 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created about 3 years ago · Last pushed about 1 year ago
Metadata Files
Readme License Citation Authors

README.MD

NODEJS APP DEMO - APXC Log Engine

this nodejs script it's a simple rest app engine for get a Product to integrate a APXC Log Engine

init a demo script

bash git clone https://github.com/APXc/apxc_log_engine_getstarted.git

bash cd apxc_log_engine_getstarted npm install

for start go to a file on /APXC_LOG_ENGINE/log.js and modify a constant TOKEN with the value of your token create on portal

```javascript

const TOKEN = 'YOURTOKEN'; // Modify THIS! const URLLOG = 'https://log.apserial.it/log/' const ORIGIN = 'DEMO NODEJS';

async function sendLog(level, message, action, object, group){ let data = { "level": LEVEL[level], "message": message, "content": JSON.stringify(object), "origin": ORIGIN, "action": action, "group": group };

let config = {
    method: 'post',
    maxBodyLength: Infinity,
    url: URL_LOG,
    headers: {
        'Authorization': `Bearer ${TOKEN}` ,
        'Content-Type': 'application/json'
    },
    data : JSON.stringify(data)
};

axios.request(config)
    .then((response) => {
        console.log(JSON.stringify(response.data));
    })
    .catch((error) => {
        console.log(error);
    });

}

```

then run the following command

bash npm start

Now you can try making an http request to the endpoint

bash curl --location 'http://localhost:3000/process' \ --header 'Content-Type: application/json' \ --data '{ "id" : "1" }'

for read a function of write log go to file /controler/general.js

```javascript

InitalLog = async (obj, group) => { await sendLog(LEVEL.INIT, "Intial Process", 'Send Request',obj, group); }

ErrorLog = async (obj, message, group) => { await sendLog(LEVEL.ERROR, Error On Process - ${message}, 'Send Request', obj, group);

} WarnLog = async (obj, message, group) => { await sendLog(LEVEL.WARNING, Warning On Process - ${message}, 'Send Request', obj, group); }

infoLog = async (obj, message, group) => { await sendLog(LEVEL.INFO, Warning On Process - ${message}, 'Send Request', obj, group); }

CompleteLog = async (obj, group) => { await sendLog(LEVEL.COMPLETE, "Completed On Process", 'Send Request', obj, group); }

```

if you need support please write an e-mail to support@apserial.it

Owner

  • Name: Alessio Pellizzaro
  • Login: APXc
  • Kind: user
  • Location: Verona, Italy
  • Company: Pellizzaro Development Projects

I am a young Italian developer, class of 1999 and I am the owner of Pellizzaro Development Projects - Company based in Italy

Citation (CITATION.cff)

# YAML 1.2
---
abstract: "Command line program to convert from Citation File Format to various other formats such as BibTeX, EndNote, RIS, schema.org, and .zenodo.json."
authors:
  -
    affiliation: "AP"
    family-names: Pellizzaro
    given-names: Alessio
    orcid: https://orcid.org/0000-0001-6164-0181
cff-version: "1.0.3"
date-released: 2023-04-01
keywords:
  - "APXC"
  - "Log"
  - "Activity Log"
  - "APXC Log Enigne"
license: MPL-2.0
message: "If you use this software, please cite it using these metadata."
repository-code: "https://github.com/APXc/apxc_log_engine_getstarted.git"
title: apxc_log_engine_getstarted
version: "0.0.1"

GitHub Events

Total
  • Delete event: 4
  • Push event: 4
  • Pull request event: 8
  • Create event: 4
Last Year
  • Delete event: 4
  • Push event: 4
  • Pull request event: 8
  • Create event: 4