Skip to content

Latest commit

 

History

History
115 lines (81 loc) · 2.01 KB

README.md

File metadata and controls

115 lines (81 loc) · 2.01 KB

Nosh

Nosh Bank API is a simple banking service for interacting.
API Docs: https://documenter.getpostman.com/view/28806235/2s9Xy2NBXf

Table of Contents

Features

  • Create Account using Phone numbers.
  • Transfer funds across different accounts with different currencies.
  • Deposit to account
  • Withdraw from account
  • View past transactions
  • Recieve mails about transactions

Technologies Used

  • Node.js
  • Express.js
  • MongoDB
  • Mongoose
  • Redis [Cache]
  • JWT (JSON Web Tokens) for authentication
  • EventEmiiter2 (for event/listenr management)

Installation

To run Nosh locally, follow these steps:

1. Clone the repository:

git clone https://github.com/tdadadavid/bank.git bank
cd bank

2. Install the necessary dependencies:

npm install

3. Add your .env file:

NODE_ENV=development
PORT=4000

# DATABASE
DATABASE_STRING='your db string'
# DATABASE_USER=root

# REDIS/CACHE
REDIS_HOST='Your redis host'
REDIS_PORT='Your redis port'
REDIS_PASSWORD='redis password'
REDIS_TTL='Globa time to live'

# TOKENS
ACCESS_TOKEN_SECRET='crazy secret'
ACCESS_TOKEN_SECRET_LIFE_SPAN='timeline'

REFRESH_TOKEN_SECRET='crazy secret'
REFRESH_TOKEN_SECRET_LIFE_SPAN='timeline'

# EXCHANGE RATES 
FIXER_API_KEY='exchange rate api key'

4. Start The Server:

npm run start:dev

6. Via Docker

    docker run dockerrundavid/nosh:v1

    localhost:8080/v1.nosh/health

7. Via Kubernetes

    coming soon

5. Test On Postman:

https://documenter.getpostman.com/view/28806235/2s9Xy2NBXf