Initial commit
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
module.exports = {
|
||||
// HTTP Status Codes
|
||||
HTTP_STATUS: {
|
||||
OK: 200,
|
||||
CREATED: 201,
|
||||
BAD_REQUEST: 400,
|
||||
UNAUTHORIZED: 401,
|
||||
FORBIDDEN: 403,
|
||||
NOT_FOUND: 404,
|
||||
CONFLICT: 409,
|
||||
INTERNAL_SERVER_ERROR: 500,
|
||||
},
|
||||
|
||||
// Bet Status
|
||||
BET_STATUS: {
|
||||
ACTIVE: 'ACTIVE',
|
||||
AWAITING_VALIDATION: 'AWAITING_VALIDATION',
|
||||
COMPLETED: 'COMPLETED',
|
||||
EXPIRED: 'EXPIRED',
|
||||
},
|
||||
|
||||
// Friend Request Status
|
||||
FRIEND_REQUEST_STATUS: {
|
||||
PENDING: 'PENDING',
|
||||
ACCEPTED: 'ACCEPTED',
|
||||
REJECTED: 'REJECTED',
|
||||
},
|
||||
|
||||
// Participant Roles
|
||||
PARTICIPANT_ROLES: {
|
||||
PARTICIPANT: 'PARTICIPANT',
|
||||
OBSERVER: 'OBSERVER',
|
||||
},
|
||||
|
||||
// Pagination Defaults
|
||||
PAGINATION: {
|
||||
DEFAULT_PAGE: 1,
|
||||
DEFAULT_LIMIT: 20,
|
||||
MAX_LIMIT: 100,
|
||||
},
|
||||
|
||||
// Mock Auth (temporaneo)
|
||||
MOCK_AUTH: {
|
||||
DEFAULT_USER_NAME: 'Mario Rossi',
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
module.exports = {
|
||||
postgres: {
|
||||
uri:
|
||||
process.env.POSTGRES_URI ||
|
||||
'postgres://admin:admin@localhost:5432/amici_scommesse',
|
||||
options: {
|
||||
dialect: 'postgres',
|
||||
logging: process.env.NODE_ENV === 'development' ? console.log : false,
|
||||
pool: {
|
||||
max: 10,
|
||||
min: 0,
|
||||
acquire: 30000,
|
||||
idle: 10000,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
mongo: {
|
||||
uri:
|
||||
process.env.MONGO_URI ||
|
||||
'mongodb://localhost:27017/amici-scommesse',
|
||||
options: {
|
||||
user: 'root',
|
||||
pass: 'root@servovio',
|
||||
authSource: 'admin',
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
const constants = require('./constants');
|
||||
const database = require('./database');
|
||||
|
||||
module.exports = {
|
||||
port: process.env.PORT || 3000,
|
||||
nodeEnv: process.env.NODE_ENV || 'development',
|
||||
isDevelopment: process.env.NODE_ENV === 'development',
|
||||
isProduction: process.env.NODE_ENV === 'production',
|
||||
...constants,
|
||||
database,
|
||||
};
|
||||
Reference in New Issue
Block a user