-
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathmain.js
More file actions
15 lines (15 loc) · 671 Bytes
/
main.js
File metadata and controls
15 lines (15 loc) · 671 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* ---------------------------------------------------- */
/* Utilice este archivo como arranque del Back-End para solo utilizar
Only Service VES_BTC */
/* ---------------------------------------------------- */
'use strict'
const api = require('./app')
const chalk = require('chalk')
const scheduleCoin = require('./schedule/coin.schedule')
const port = process.env.PORT || 3000
// Conexion con redisDB
require('./config/redis-db').initRedisDB
.then((redisClient)=> scheduleCoin(redisClient))
.catch((error) =>{throw new Error(error)})
// Inicio del server
api.listen(port, () => console.log(`${chalk.green('[btven-api-v2]')} server listening on port ${port}`))