Code Monkey home page Code Monkey logo

crypto-todo's Introduction

Prerequisites

  • Nodejs12.x+
  • PostgreSQL 11
  • Sequelize
  • Postman

File Structure

DB Snapshot

Application Setup

Run the following commands.

Clone from repo

$ git clone https://github.com/smartnav/crypto-todo

Goto the folder

$ cd crypto-todo

Install npm dependencies

$ npm install

Database Setup

Create table with Migrations

$ npx sequelize-cli db:migrate It will create table in the database.

Db connection

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"
  },
  .................

App Configuration

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

Start Application

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

Test with postman

Import this link to your postman and Run.

<link> : https://www.getpostman.com/collections/c3e99d541e625c481202

Direct Link

http://localhost:8000/service/price?fsyms=BTC,LINK&tsyms=USD,ETH

Note

I tried myself best within this timeframe but we can make it better if I get more time.

###End

crypto-todo's People

Contributors

smartnav avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.