les comparto mi archivo now.json
{
"version": 2,
"env": {
"NODE_ENV": "production",
"MYSQL_DB_HOST": "@mysql_db_host",
"MYSQL_DB_PORT": "@mysql_db_port",
"MYSQL_DB_USER": "@mysql_db_user",
"MYSQL_DB_PASSWORD": "@mysql_db_password",
"MYSQL_DATABASE": "@mysql_database",
"MYSQL_SERVICE_HOST": "@mysql_service_host",
"SENTRY_ID": "@sentry_id",
"SENTRY_DNS": "@sentry_dns",
"AUTH_JWT_SECRET": "@auth_jwt_token"
},
"builds": [
{
"src": "src/api/index.js",
"use": "@now/node"
},
{
"src": "src/microservices/mysql/index.js",
"use": "@now/node"
},
{
"src": "src/microservices/posts/index.js",
"use": "@now/node"
}
],
"routes": [
{
"src": "/api/users(.*)",
"dest": "src/api/index.js"
},
{
"src": "/api/auth(.*)",
"dest": "src/api/index.js"
},
{
"src": "/api/posts(.*)",
"dest": "src/microservices/posts/index.js"
},
{
"src": "/api/mysql(.*)",
"dest": "src/microservices/mysql/index.js"
}
]
}
¿Quieres ver más aportes, preguntas y respuestas de la comunidad?