From 540120fdb9260b99ea5dc5320fa7088f68309048 Mon Sep 17 00:00:00 2001 From: Tulio Castro Date: Wed, 3 Sep 2025 16:40:29 -0300 Subject: [PATCH] Voltando .env para .env.example. --- .env.example | 40 ++++++++++++++++++++++++++++++++++++++++ .gitignore | 1 - 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..c163a0a --- /dev/null +++ b/.env.example @@ -0,0 +1,40 @@ +# Contents of the file: /servicenow-glpi-sync/servicenow-glpi-sync/.env.example + +# This is an example of the environment variables needed for the application. + +# ServiceNow API Configuration +SERVICENOW_INCIDENT_URL="https://caoadev.service-now.com/api/now/table/incident?sysparm_display_value=all&sysparm_limit=20&sysparm_query=ORDERBYDESCsys_created_on&sysparm_fields=number%2Copened_by%2Copened_at%2Clocation%2Cshort_description%2Cdescription%2Cvariables.caller_id%2Cvariables.location%2Cvariables.telephone_favorecido_rh%2Cvariables.numero_ramal%2Copened_by.email%2Csys_id%5Eassignment_group%3D46d44f91c611227500713c12f0b7c78d" +SERVICENOW_REQUEST_URL="https://start.caoatec.com.br/api/now/table/sc_req_item?sysparm_fields=number%2Crequest%2Copened_by%2Copened_at%2Clocation%2Cshort_description%2Cdescription%2Cassignment_group%2Csys_id&sysparm_display_value=all&sysparm_query=assignment_group%3D1132c9e01bfad410e77eb9121b4bcbab" +SERVICENOW_USERNAME=SOTHIS.CAOA +SERVICENOW_PASSWORD=#Sothis20 + +# GLPI API Configuration +GLPI_URL=https://your-glpi-instance/apirest.php/ +GLPI_APP_TOKEN=your_glpi_app_token +GLPI_USER_TOKEN=your_glpi_user_token + +# GLPI access via DB (use DB connection instead of API) +GLPI_DB_TYPE=mysql # ou postgresql +GLPI_DB_HOST=localhost +GLPI_DB_PORT=3306 +GLPI_DB_USER=glpi_user +GLPI_DB_PASSWORD=your_glpi_db_password +GLPI_DB_NAME=glpi_database +GLPI_DB_CHARSET=utf8mb4 +GLPI_TABLE_PREFIX=glpi_ # deixe em branco se não houver prefixo + +# Database Configuration +DB_HOST=localhost +DB_PORT=3306 # or 5432 for PostgreSQL +DB_USER=your_database_user +DB_PASSWORD=your_database_password +DB_NAME=your_database_name + +# Logging Configuration +LOG_LEVEL=info +LOG_FILE_PATH=logs/app.log +ERROR_LOG_FILE_PATH=logs/error.log + +# Other Configuration +PORT=3000 +NODE_ENV=development \ No newline at end of file diff --git a/.gitignore b/.gitignore index 6bd62f6..3622f3a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,4 @@ logs/*.log .env config/*.json .DS_Store -.env.example *.tmp