diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..5008ddfc Binary files /dev/null and b/.DS_Store differ diff --git a/.gitignore b/.gitignore index c81546b0..9d191064 100644 --- a/.gitignore +++ b/.gitignore @@ -41,10 +41,6 @@ build/Release node_modules/ jspm_packages/ -# Firebase config -src/config/firebaseConfig.js -src/config/firebaseConfig-dev.js -src/config/firebaseAuthConfig.js # Snowpack dependency directory (https://snowpack.dev/) web_modules/ @@ -125,4 +121,6 @@ package-lock.json # Arquivo de configuração de backup remoto rclone.conf -miaajuda.pem \ No newline at end of file +miaajuda.pem + +.idea \ No newline at end of file diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..790e1105 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v20.10.0 diff --git a/src/config/database.js b/src/config/database.js index 35c7f164..1a8b26fa 100644 --- a/src/config/database.js +++ b/src/config/database.js @@ -4,7 +4,6 @@ const UserSeed = require('../utils/seed/UserSeed'); const HelpSeed = require('../utils/seed/HelpOfferCampaignSeed'); const NotificationSeed = require('../utils/seed/NotificationSeed'); const BadgeSeed = require('../utils/seed/BadgeTemplateSeed'); -const TimelineEventTemplateSeed = require('../utils/seed/TimelineEventTemplateSeed'); const databaseURL = process.env.DATABASE_URL || 'mongodb://mongo:27017/miaAjudaDB'; const envType = process.env.NODE_ENV || 'development'; @@ -23,9 +22,8 @@ const databaseConnect = async () => { if (envType === 'development') { await UserSeed(); await HelpSeed(); - await NotificationSeed(); - await BadgeSeed(); - await TimelineEventTemplateSeed(); + // await NotificationSeed(); + // await BadgeSeed(); } } catch (err) { console.log('Não foi possível inicicializar corretamente a base de dados!'); diff --git a/src/config/firebaseAuthConfig.js b/src/config/firebaseAuthConfig.js new file mode 100644 index 00000000..d331450f --- /dev/null +++ b/src/config/firebaseAuthConfig.js @@ -0,0 +1,19 @@ +const config = { + type: 'service_account', + project_id: 'miaajudadev', + private_key_id: process.env.FIREBASE_AUTH_CONFIG_PRIVATE_KEY_ID, + private_key: process.env.FIREBASE_AUTH_CONFIG_PRIVATE_KEY, + client_email: 'firebase-adminsdk-1djmt@miaajudadev.iam.gserviceaccount.com', + client_id: '105126767310578944074', + auth_uri: 'https://accounts.google.com/o/oauth2/auth', + token_uri: 'https://oauth2.googleapis.com/token', + auth_provider_x509_cert_url: 'https://www.googleapis.com/oauth2/v1/certs', + client_x509_cert_url: 'https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-1djmt%40miaajudadev.iam.gserviceaccount.com', +}; + +const databaseURL = 'https://miaajudadev.firebaseio.com'; + +module.exports = { + config, + databaseURL, +}; diff --git a/src/config/firebaseConfig-dev.js b/src/config/firebaseConfig-dev.js new file mode 100644 index 00000000..de5f7e18 --- /dev/null +++ b/src/config/firebaseConfig-dev.js @@ -0,0 +1,21 @@ +const config = { + type: 'service_account', + project_id: 'miaajudadev', + private_key_id: process.env.FIREBASE_CONFIG_DEV_PRIVATE_KEY_ID, + private_key: process.env.FIREBASE_CONFIG_DEV_PRIVATE_KEY, + client_email: 'firebase-adminsdk-1djmt@miaajudadev.iam.gserviceaccount.com', + client_id: '105126767310578944074', + auth_uri: 'https://accounts.google.com/o/oauth2/auth', + token_uri: 'https://oauth2.googleapis.com/token', + auth_provider_x509_cert_url: 'https://www.googleapis.com/oauth2/v1/certs', + client_x509_cert_url: 'https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-1djmt%40miaajudadev.iam.gserviceaccount.com', +}; + + +const databaseURL = 'https://miaajudadev.firebaseio.com'; + + +module.exports = { + config, + databaseURL, +}; diff --git a/src/config/firebaseConfig.js b/src/config/firebaseConfig.js new file mode 100644 index 00000000..e39d313c --- /dev/null +++ b/src/config/firebaseConfig.js @@ -0,0 +1,19 @@ +const config = { + type: 'service_account', + project_id: 'miaajuda-1b205', + private_key_id: process.env.FIREBASE_CONFIG_PRIVATE_KEY_ID, + private_key: process.env.FIREBASE_CONFIG_PRIVATE_KEY, + client_email: 'firebase-adminsdk-ee658@miaajuda-1b205.iam.gserviceaccount.com', + client_id: '103236107628512014144', + auth_uri: 'https://accounts.google.com/o/oauth2/auth', + token_uri: 'https://oauth2.googleapis.com/token', + auth_provider_x509_cert_url: 'https://www.googleapis.com/oauth2/v1/certs', + client_x509_cert_url: 'https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-ee658%40miaajuda-1b205.iam.gserviceaccount.com', +}; + +const databaseURL = 'https://miaajuda-1b205.firebaseio.com'; + +module.exports = { + config, + databaseURL, +};