Browse Source

Sessão 24

master
eduveks 5 years ago
parent
commit
de8d2a5d79
8 changed files with 184 additions and 12 deletions
  1. +62
    -10
      config/_production.json
  2. +95
    -0
      config/sample.json
  3. +1
    -1
      ui/src/components/TabelaPessoas/index.jsx
  4. +8
    -0
      website/build.sh
  5. +5
    -0
      website/src/config-dev.json
  6. +5
    -0
      website/src/config-prod.json
  7. +5
    -0
      website/src/config.json
  8. +3
    -1
      website/src/index.js

+ 62
- 10
config/_production.json View File

@ -1,7 +1,31 @@
{
"cron": {"jobs": []},
"url": {
"admin": "/backoffice/",
"public": "/public/",
"services": "/api/"
},
"cron": {
"secret": "VLgL7EJZ4yXPAjce",
"jobs": [
{
"name": "daily-summary",
"config": "0 0/1 * * * ?",
"url": "/api/jobs/daily-summary"
}
]
},
"settings": {"public": {}},
"smtp": {},
"smtp": {
"default": {
"enabled": true,
"host": "serua.veks.net",
"port": 465,
"ssl": true,
"from": "academy-test@netuno.org",
"username": "academy-test@netuno.org",
"password": "gDj1pwQ5T#0#"
}
},
"name": "social_ma",
"setup": {
"schema": {
@ -20,12 +44,40 @@
},
"locale": "pt_PT",
"remote": {},
"db": {"default": {
"password": "",
"engine": "h2",
"port": "",
"host": "",
"name": "social_ma",
"username": ""
}}
"db": {
"default": {
"password": "S3cR3t",
"engine": "pg",
"port": "5432",
"host": "localhost",
"name": "social_ma",
"username": "social_ma"
},
"antiga": {
"password": "",
"engine": "h2",
"port": "",
"host": "",
"name": "social_ma",
"username": ""
}
},
"jwt": {
"enabled": true,
"secret": "@X{DC5#9cuM#qG?d",
"access_expires": 60,
"refresh_expires": 1440,
"algorithm": "HS512"
},
"openapi": {
"host": "http://social-ma.eduardo-velasques.dev.netuno.org:10080",
"basePath": "/api",
"schemes": [ "http" ],
"servers": [
{
"url": "http://social-ma.eduardo-velasques.dev.netuno.org:10080/api",
"description": "Produção"
}
]
}
}

+ 95
- 0
config/sample.json View File

@ -0,0 +1,95 @@
{
"cron": {
"secret": "VLgL7EJZ4yXPAjce",
"jobs": [
{
"name": "daily-summary",
"config": "0 0/1 * * * ?",
"url": "/services/jobs/daily-summary"
}
]
},
"settings": {"public": {}},
"smtp": {
"default": {
"enabled": true,
"host": "serua.veks.net",
"port": 465,
"ssl": true,
"from": "academy-test@netuno.org",
"username": "academy-test@netuno.org",
"password": "********"
}
},
"name": "social_ma",
"setup": {
"schema": {
"execution": true,
"auto_create": true
},
"scripts": {"execution": true},
"enabled": true
},
"language": "pt_PT",
"firebase": {
"app_name": "",
"database_url": "",
"key_file": "",
"listener_secret": ""
},
"locale": "pt_PT",
"remote": {},
"commands": [
{
"path": "ui",
"command": "npm run watch",
"enabled": true
},{
"path": "website",
"command": "npm run start",
"enabled": true
}
],
"db": {
"default": {
"password": "S3cR3t",
"engine": "pg",
"port": "5432",
"host": "localhost",
"name": "social_ma",
"username": "social_ma"
},
"antiga": {
"password": "",
"engine": "h2",
"port": "",
"host": "",
"name": "social_ma",
"username": ""
}
},
"cors": [
{
"enabled": true,
"origins": [ "http://eduardo-velasques.dev.netuno.org:10030", "http://localhost:3000", "http://127.0.0.1:3000" ]
}
],
"jwt": {
"enabled": true,
"secret": "@X{DC5#9cuM#qG?d",
"access_expires": 60,
"refresh_expires": 1440,
"algorithm": "HS512"
},
"openapi": {
"host": "http://eduardo-velasques.dev.netuno.org:10090",
"basePath": "/services",
"schemes": [ "http" ],
"servers": [
{
"url": "http://eduardo-velasques.dev.netuno.org:10090/services",
"description": "Desenvolvimento Remoto"
}
]
}
}

+ 1
- 1
ui/src/components/TabelaPessoas/index.jsx View File

@ -23,7 +23,7 @@ const TabelaPessoas = () => {
});
};
netuno.service({
url: '/services/pessoas',
url: netuno.config.urlServices +'pessoas',
method: 'GET',
credentials: 'include',
headers: {


+ 8
- 0
website/build.sh View File

@ -0,0 +1,8 @@
#!/bin/bash
cp src/config-prod.json src/config.json
npm run build
cp src/config-dev.json src/config.json

+ 5
- 0
website/src/config-dev.json View File

@ -0,0 +1,5 @@
{
"services": {
"url": "http://eduardo-velasques.dev.netuno.org:10090/services"
}
}

+ 5
- 0
website/src/config-prod.json View File

@ -0,0 +1,5 @@
{
"services": {
"url": "/api"
}
}

+ 5
- 0
website/src/config.json View File

@ -0,0 +1,5 @@
{
"services": {
"url": "http://eduardo-velasques.dev.netuno.org:10090/services"
}
}

+ 3
- 1
website/src/index.js View File

@ -6,8 +6,10 @@ import reportWebVitals from './reportWebVitals';
import _service from '@netuno/service-client';
import config from "./config.json";
_service.config({
prefix: 'http://eduardo-velasques.dev.netuno.org:10090/services'
prefix: config.services.url
});
ReactDOM.render(


Loading…
Cancel
Save