Coder Social home page Coder Social logo

node-redis-currency-exchange's Introduction

cache-it

Stack:

  • backend api is built is NodeJS
    • caching on the back end is done with redis
  • front end client is built with ReactJS
    • caching on the front end is done with react-query
  • docker & docker-compose stitch all the builds and run all apps in unison.

Run all services ( recommended )

  • make sure docker is installed on your machine
docker-compose up
  • if any changes are made to the files, be sure to run docker-compose build to rebuild the project.

This will :

  • 🚀 launch a redis instance on port 6379
  • 🚀 launch the API server.js on port 5000
  • 🚀 launch the ui react app on port 3000

Launch api, redis, and ui projects independently

  • Maybe you don't want to use docker-compose.
    • must run each service independently on localhost.
redis
docker run -d --name redis-cache -p 127.0.0.1:6379:6379 redis
nodejs api ( from the ./api folder root
npm i && npm run start
reactjs client ui ( from the ./ui folder root
npm i && npm run start
Next steps () => {}

front end:

  • remove extra dependencies and leverage the Intl.numberFormat that vanilla JS has.
  • use the userLocale to shape the resulting currencies in formats that make sense for the users locale.
  • add translation files for text to make evoloving into other languages simple.
  • add commas to the output text fields.
  • add 'reset' button.
  • add tests
  • consider replacing the two useEffects with an Observable stream that could reduce unintended side effects from the useEffects.
  • package up the front end into a standalone component that could be imported and consumed.

back end:

  • package up the back end and deploy on AWS lambda for easy consumption.
  • have fallback API providers in case the existing provider doesn't give us what we want
  • actually develop models/types for the back end so that we can service a uniform shape to return that is agnostic of the provider and easy to evolve over time.

node-redis-currency-exchange's People

Contributors

natepappenhagen avatar

Stargazers

 avatar

Watchers

 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.