git clone [email protected]:edilsonlonC/WChallenge-cryptocurrencies-monitor.git
cd WChallenge-cryptocurrencies-monitor
cp .env-example .env
npm install
DB_USER=
DB_PASSWORD=
DB_NAME=
DB_HOST=
DB_DIALECT=
export const config = {
secretKeyJwt: process.env.secretKeyJwt || '',
secretKeyRefreshToken: process.env.secretKeyRefreshToken || '',
defaultLang: process.env.defaultLang || '',
versionApi: process.env.versionApi || '',
minExpiredSession: process.env.minExpiredSession,
};
module.exports = {
development: {
username: process.env.DB_USER || '',
password: process.env.DB_PASSWORD || '',
database: process.env.DB_NAME || '',
host: process.env.DB_HOST || '',
dialect: process.env.DB_DIALECT || 'mysql',
},
test: {
username: process.env.DB_USER || '',
password: process.env.DB_PASSWORD || '',
database: process.env.DB_NAME || '',
host: process.env.DB_HOST || '',
dialect: process.env.DB_DIALECT || 'mysql',
},
production: {
username: process.env.DB_USER || '',
password: process.env.DB_PASSWORD || '',
database: process.env.DB_NAME || '',
host: process.env.DB_HOST || '',
dialect: process.env.DB_DIALECT || 'mysql',
},
};
Al configurar todas la variables de entorno se pueden hacer las migraciones y ejecutar los seeders de la base de datos
npm run migrate
npm run seed
npm run migrate crea las tablas y columnas de la base de datos por medio de las migraciones en la carpeta src/migrations
npm run dev
npm run build
pm2 start ecosystem.config.js