wchopite / moneyexchange.bottlejs

A Money Exchange service done with bottlejs, a Dependency Injection Container Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to start

You need to add information to your MongoDb database

Two collections must be created:

  1. coins
[
  {
    "name" : "Dolar",
    "description" : "Dolar",
    "code" : "USD",
    "symbol" : "$",
    "date" : "2019-07-30T19:16:39.080Z"
  },
  {
    "name" : "Euro",
    "description" : "Euro",
    "code" : "EUR",
    "symbol" : "",
    "date" : "2019-07-30T19:16:39.080Z"
  }
]
  1. coinsconversions
[
  {
    "base" : "USD",
    "to" : "EUR",
    "conversionFactor" : 0.90,
    "date" : 1564581391869.0,
    "createdAt" : "2019-07-31T13:56:31.873Z",
    "__v" : 0
  }
]

Once you have added the data to your database, you must configure the config file to connect to the database

Path: /config/default.json

Var: DB.url

For example: "mongodb://localhost/moneyExchange"

Now, you can install and start the server

npm install & npm start

Important Notes

The code use a Dependency Injection Container (bottlejs). All the dependencies for every part of the code, is configured and added in the container/container.js file. For more information about the use of bottlejs visit https://www.npmjs.com/package/bottlejs

About

A Money Exchange service done with bottlejs, a Dependency Injection Container Library


Languages

Language:JavaScript 98.2%Language:Dockerfile 1.8%