- Nodejs12.x+
- PostgreSQL 11
- Sequelize
- Postman
$ git clone https://github.com/smartnav/crypto-todo
$ cd crypto-todo
$ npm install
- postgreSQL 11 should be installed to setup the this application.
- sequelize-cli should be installed for migrations
<link>
: https://sequelize.org/master/manual/migrations.html
$ npx sequelize-cli db:migrate
It will create table in the database.
Go to server/config/config.json
file, and change db connections.
{
"development": {
"username": "postgres",
"password": "pg@123#",
"database": "tododb",
"host": "127.0.0.1",
"dialect": "postgres"
},
.................
Open .env
file from the applicatoin and configure your settings. Currently I have added some of the fields for default sync. You can add as many as you want.
CRYPTO_URL=https://min-api.cryptocompare.com/data/pricemultifull
FSYMS=BTC,LINK,MKR
TSYMS=USD,EUR,ETH,LTC
CRONTIME=2
PORT=8000
Run the following command for start the application, I will run on default port 8000, but you can change it from .env
file.
$ npm start
Import this link to your postman and Run.
<link>
: https://www.getpostman.com/collections/c3e99d541e625c481202
http://localhost:8000/service/price?fsyms=BTC,LINK&tsyms=USD,ETH
###End